Results for: "Dir.chdir"

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.

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 path where gem executables are to be installed.

The path were rubygems plugins are to be installed.

The path to the data directory specified by the gem name. If the package is not available as a gem, return nil.

The default directory for binaries

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 to the data directory for this gem.

Return the directories that Specification uses to find specs.

Set the directories that Specification uses to find specs. Setting this resets the list of known specs.

Quietly ensure the Gem directory dir contains all the proper subdirectories. If we can’t create a directory due to a permission problem, then we will silently continue.

If mode is given, missing directories are created with this mode.

World-writable directories will never be created.

Paths where RubyGems’ .rb files and bin files are installed

Search took: 5ms  ·  Total Results: 1079