Temporarily change the current working directory to dir, apply function f and finally return to the original directory.
Return the files and directories in the directory dir (or the current working directory if not given).
Return an iterator that walks the directory tree of a directory. The iterator returns a tuple containing (rootpath, dirs, files). The directory tree can be traversed top-down or bottom-up. If walkdir encounters a SystemError it will rethrow the error by default. A custom error handling function can be provided through onerror keyword argument. onerror is called with a SystemError as argument.
Make a new directory with name path and permissions mode. mode defaults to 0o777, modified by the current file creation mask. This function never creates more than one directory. If the directory already exists, or some intermediate directories do not exist, this function throws an error. See mkpath for a function which creates all required intermediate directories. Return path.
Create all directories in the given path, with permissions mode. mode defaults to 0o777, modified by the current file creation mask. Return path.
Creates a symbolic link to target with the name link.
This function raises an error under operating systems that do not support soft symbolic links, such as Windows XP.
Return the target location a symbolic link path points to.
Change the permissions mode of path to mode. Only integer modes (e.g. 0o777) are currently supported. If recursive=true and the path is a directory all permissions in that directory will be recursively changed. Return path.
Change the owner and/or group of path to owner and/or group. If the value entered for owner or group is -1 the corresponding ID will not change. Only integer owners and groups are currently supported. Return path.
Primitive type which wraps the native OS file descriptor. RawFDs can be passed to methods like stat to discover information about the underlying file, and can also be used to open streams, with the RawFD describing the OS file backing the stream.
Like stat, but for symbolic links gets the info for the link itself rather than the file it refers to. This function must be called on a file path rather than a file object or a file descriptor.
For allowed arguments, see stat.
Like uperm but gets the permissions of the group owning the file.
Copy the file, link, or directory from src to dst. force=true will first remove an existing dst.
If follow_symlinks=false, and src is a symbolic link, dst will be created as a symbolic link. If follow_symlinks=true and src is a symbolic link, dst will be a copy of the file or directory src refers to. Return dst.
Download a file from the given url, optionally renaming it to the given local file name. Note that this function relies on the availability of external tools such as curl, wget or fetch to download the file and is provided for convenience. For production use or situations in which more options are needed, please use a package that provides the desired functionality instead.
Move the file, link, or directory from src to dst. force=true will first remove an existing dst. Return dst.
ERROR: ArgumentError: 'goodbye.txt' exists. `force=true` is required to remove 'goodbye.txt' before moving.
Delete the file, link, or empty directory at the given path. If force=true is passed, a non-existing path is not treated as error. If recursive=true is passed and the path is a directory, then all contents are removed recursively.
Update the last-modified timestamp on a file to the current time. Return path.
We can see the mtime has been modified by touch.
Generate a temporary file path. This function only returns a path; no file is created. The path is likely to be unique, but this cannot be guaranteed.
This can lead to race conditions if another process obtains the same file name and creates the file before you are able to. Using mktemp() is recommended instead.
Obtain the path of a temporary directory (possibly shared with other processes).
Return (path, io), where path is the path of a new temporary file in parent and io is an open file object for this path.
Apply the function f to the result of mktemp(parent) and remove the temporary file upon completion.
Create a temporary directory in the parent directory and return its path. If parent does not exist, throw an error.
Apply the function f to the result of mktempdir(parent) and remove the temporary directory upon completion.
Return true if path is a block device, false otherwise.
Return true if path is a character device, false otherwise.
Return true if path is a directory, false otherwise.
Return true if path is a FIFO, false otherwise.
Return true if path is a regular file, false otherwise.
Return true if path is a symbolic link, false otherwise.
Return true if path is a mount point, false otherwise.
Return true if path is a valid filesystem path, false otherwise.
Return true if path has the setgid flag set, false otherwise.
Return true if path has the setuid flag set, false otherwise.
Return true if path is a socket, false otherwise.
Return true if path has the sticky bit set, false otherwise.
homedir determines the home directory via libuv's uv_os_homedir. For details (for example on how to specify the home directory via environment variables), see the uv_os_homedir documentation.
Get the file name part of a path.
Expand to a string with the path to the file containing the macrocall, or an empty string if evaluated by julia -e <expr>. Return nothing if the macro was missing parser source information. Alternatively see PROGRAM_FILE.
Expand to a string with the absolute path to the directory of the file containing the macrocall. Return the current working directory if run from a REPL or if evaluated by julia -e <expr>.
Expand to the line number of the location of the macrocall. Return 0 if the line number could not be determined.
Determine whether a path is absolute (begins at the root directory).
Determine whether a path refers to a directory (for example, ends with a path separator).
Join path components into a full path. If some argument is an absolute path or (on Windows) has a drive specification that doesn't match the drive computed for the join of the preceding paths, then prior components are dropped.
Convert a path to an absolute path by adding the current directory if necessary. Also normalizes the path as in normpath.
Convert a set of paths to an absolute path by joining them together and adding the current directory if necessary. Equivalent to abspath(joinpath(path, paths...)).
Normalize a path, removing "." and ".." entries.
Canonicalize a path by expanding symbolic links and removing "." and ".." entries.
Return a relative filepath to path either from the current directory or from an optional start directory. This is a path computation: the filesystem is not accessed to confirm the existence or nature of path or startpath.
On Unix systems, replace a tilde character at the start of a path with the current user's home directory.
Split a path into a tuple of the directory name and file name.
On Windows, split a path into the drive letter part and the path part. On Unix systems, the first component is always the empty string.
If the last component of a path contains a dot, split the path into everything before the dot and everything including and after the dot. Otherwise, return a tuple of the argument unmodified and the empty string.