A Directory object, as well as associated functions.
Creates a directory.
The created directory is set for permission mode 0755 (octal), meaning it is read+write+execute by owner, but only read+execute by group and others.
IF the directory was created successfully, a boolean true is returned. If the directory cannot be made because it already exists, false is returned. If the directory cannot be made because an error occurred, nil is returned.
Since: 1.11.3
Returns true if the given directory name exists.
If the directory exists, a boolean true is returned. If the path is a file instead, false is returned. If the path does not exist or an error occurred, nil is returned.
Since: 1.11.3
Removes an empty directory.
If the directory was removed successfully, a boolean true is returned. If the directory cannot be removed because it does not exist, false is returned. If the directory cannot be removed because an error occurred, nil is returned.
This function only removes empty directories. To remove a directory regardless, use Dir.remove_all().
Since: 1.11.3
Removes an empty or non-empty directory.
If the directory was removed successfully, a boolean true is returned. If the directory cannot be removed because it does not exist, false is returned. If the directory cannot be removed because an error occurred, nil is returned.
Since: 1.11.3
Opens a directory and returns a Dir object representing the files in the directory.
for filename in Dir.open(path) do ... end
The pathname of the directory.
If given, only files with this extension will be returned.
Gets the personal configuration directory path, with filename if supplied.
Since: 1.11.3
Gets the global configuration directory path, with filename if supplied.
Since: 1.11.3
Gets the personal plugins directory path.
Since: 1.11.3
Gets the global plugins directory path.
Since: 1.11.3