Results for: "Dir.chdir"

Common implementation for SVCB-compatible resource records.

No documentation available

Returns the real (absolute) pathname of pathname in the actual filesystem. The real pathname doesn’t contain symlinks or useless dots.

If dir_string is given, it is used as a base directory for interpreting relative pathname instead of the current directory.

The last component of the real pathname can be nonexistent.

Returns all components of the filename given in file_name except the last one (after first stripping trailing separators). The filename can be formed using both File::SEPARATOR and File::ALT_SEPARATOR as the separator when File::ALT_SEPARATOR is not nil.

File.dirname("/home/gumby/work/ruby.rb")   #=> "/home/gumby/work"

If level is given, removes the last level components, not only one.

File.dirname("/home/gumby/work/ruby.rb", 2) #=> "/home/gumby"
File.dirname("/home/gumby/work/ruby.rb", 4) #=> "/"

With string object given, returns true if path is a string path leading to a directory, or to a symbolic link to a directory; false otherwise:

File.directory?('.')              # => true
File.directory?('foo')            # => false
File.symlink('.', 'dirlink')      # => 0
File.directory?('dirlink')        # => true
File.symlink('t,txt', 'filelink') # => 0
File.directory?('filelink')       # => false

Argument path can be an IO object.

Returns the real (absolute) pathname of self in the actual filesystem.

Does not contain symlinks or useless dots, .. and ..

The last component of the real pathname can be nonexistent.

Returns all but the last component of the path.

See File.dirname.

See FileTest.directory?.

Create the referenced directory.

See Dir.mkdir.

Remove the referenced directory.

See Dir.rmdir.

Opens the referenced directory.

See Dir.open.

Returns system configuration directory.

This is typically "/etc", but is modified by the prefix used when Ruby was compiled. For example, if Ruby is built and installed in /usr/local, returns "/usr/local/etc" on other platforms than Windows.

On Windows, this always returns the directory provided by the system.

Returns system temporary directory; typically “/tmp”.

With string object given, returns true if path is a string path leading to a directory, or to a symbolic link to a directory; false otherwise:

File.directory?('.')              # => true
File.directory?('foo')            # => false
File.symlink('.', 'dirlink')      # => 0
File.directory?('dirlink')        # => true
File.symlink('t,txt', 'filelink') # => 0
File.directory?('filelink')       # => false

Argument path can be an IO object.

The path where gem executables are to be installed.

The path were rubygems plugins are to be installed.

Creates directories at the paths in the given list (a single path or an array of paths); returns list if it is an array, [list] otherwise.

Argument list or its elements should be interpretable as paths.

With no keyword arguments, creates a directory at each path in list by calling: Dir.mkdir(path, mode); see Dir.mkdir:

FileUtils.mkdir(%w[tmp0 tmp1]) # => ["tmp0", "tmp1"]
FileUtils.mkdir('tmp4')        # => ["tmp4"]

Keyword arguments:

Raises an exception if any path points to an existing file or directory, or if for any reason a directory cannot be created.

Related: FileUtils.mkdir_p.

Creates directories at the paths in the given list (a single path or an array of paths); returns list if it is an array, [list] otherwise.

Argument list or its elements should be interpretable as paths.

With no keyword arguments, creates a directory at each path in list by calling: Dir.mkdir(path, mode); see Dir.mkdir:

FileUtils.mkdir(%w[tmp0 tmp1]) # => ["tmp0", "tmp1"]
FileUtils.mkdir('tmp4')        # => ["tmp4"]

Keyword arguments:

Raises an exception if any path points to an existing file or directory, or if for any reason a directory cannot be created.

Related: FileUtils.mkdir_p.

Creates directories at the paths in the given list (a single path or an array of paths), also creating ancestor directories as needed; returns list if it is an array, [list] otherwise.

Argument list or its elements should be interpretable as paths.

With no keyword arguments, creates a directory at each path in list, along with any needed ancestor directories, by calling: Dir.mkdir(path, mode); see Dir.mkdir:

FileUtils.mkdir_p(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
FileUtils.mkdir_p('tmp4/tmp5')             # => ["tmp4/tmp5"]

Keyword arguments:

Raises an exception if for any reason a directory cannot be created.

FileUtils.mkpath and FileUtils.makedirs are aliases for FileUtils.mkdir_p.

Related: FileUtils.mkdir.

Creates directories at the paths in the given list (a single path or an array of paths), also creating ancestor directories as needed; returns list if it is an array, [list] otherwise.

Argument list or its elements should be interpretable as paths.

With no keyword arguments, creates a directory at each path in list, along with any needed ancestor directories, by calling: Dir.mkdir(path, mode); see Dir.mkdir:

FileUtils.mkdir_p(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
FileUtils.mkdir_p('tmp4/tmp5')             # => ["tmp4/tmp5"]

Keyword arguments:

Raises an exception if for any reason a directory cannot be created.

FileUtils.mkpath and FileUtils.makedirs are aliases for FileUtils.mkdir_p.

Related: FileUtils.mkdir.

No documentation available
No documentation available

Removes directories at the paths in the given list (a single path or an array of paths); returns list, if it is an array, [list] otherwise.

Argument list or its elements should be interpretable as paths.

With no keyword arguments, removes the directory at each path in list, by calling: Dir.rmdir(path); see Dir.rmdir:

FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
FileUtils.rmdir('tmp4/tmp5')             # => ["tmp4/tmp5"]

Keyword arguments:

Raises an exception if a directory does not exist or if for any reason a directory cannot be removed.

Related: methods for deleting.

Removes directories at the paths in the given list (a single path or an array of paths); returns list, if it is an array, [list] otherwise.

Argument list or its elements should be interpretable as paths.

With no keyword arguments, removes the directory at each path in list, by calling: Dir.rmdir(path); see Dir.rmdir:

FileUtils.rmdir(%w[tmp0/tmp1 tmp2/tmp3]) # => ["tmp0/tmp1", "tmp2/tmp3"]
FileUtils.rmdir('tmp4/tmp5')             # => ["tmp4/tmp5"]

Keyword arguments:

Raises an exception if a directory does not exist or if for any reason a directory cannot be removed.

Related: methods for deleting.

The default directory for binaries

Search took: 4ms  ·  Total Results: 1022