fnmatch?

File.fnmatch?( pattern, path, [flags] ) â (true or false) Class Public methods Returns true if path matches against pattern The pattern is not a regular expression; instead it follows rules similar to shell filename globbing. It may contain the following metacharacters: * Matches any file. Can be restricted by other values in the glob. * will match all files; c* will match all files beginning with c; *c will match all files ending with c; and *c* will match all files that have c

fnmatch

File.fnmatch( pattern, path, [flags] ) â (true or false)File.fnmatch?( pattern, path, [flags] ) â (true or false) Class Public methods Returns true if path matches against pattern The pattern is not a regular expression; instead it follows rules similar to shell filename globbing. It may contain the following metacharacters: * Matches any file. Can be restricted by other values in the glob. * will match all files; c* will match all files beginning with c; *c will match all files

file?

File.file?(file_name) â true or false Class Public methods Returns true if the named file exists and is a regular file. file_name can be an IO object.

extname

File.extname(path) â string Class Public methods Returns the extension (the portion of file name in path starting from the last period). If path is a dotfile, or starts with a period, then the starting dot is not dealt with the start of the extension. An empty string will also be returned when the period is the last character in path. File.extname("test.rb") #=> ".rb" File.extname("a/b/d/test.rb") #=> ".rb" File.extname("foo.") #=> "" File.extname("

expand_path

File.expand_path(file_name [, dir_string] ) â abs_file_name Class Public methods Converts a pathname to an absolute pathname. Relative paths are referenced from the current working directory of the process unless dir_string is given, in which case it will be used as the starting point. The given pathname may start with a â~'', which expands to the process owner's home directory (the environment variable HOME must be set correctly). â~user'' expands to the named user's home direc

exists?

File.exists?(file_name) â true or false Class Public methods Return true if the named file exists. file_name can be an IO object. âfile existsâ means that stat() or fstat() system call is successful.

exist?

File.exist?(file_name) â true or false Class Public methods Return true if the named file exists. file_name can be an IO object. âfile existsâ means that stat() or fstat() system call is successful.

executable_real?

File.executable_real?(file_name) â true or false Class Public methods Returns true if the named file is executable by the real user id of this process.

executable?

File.executable?(file_name) â true or false Class Public methods Returns true if the named file is executable by the effective user id of this process.

dirname

File.dirname(file_name) â dir_name Class Public methods Returns all components of the filename given in file_name except the last one. The filename can be formed using both File::SEPARATOR and File::ALT_SEPARETOR as the separator when File::ALT_SEPARATOR is not nil. File.dirname("/home/gumby/work/ruby.rb") #=> "/home/gumby/work"