Filesystem¶
-
isblockdev
(path) → Bool¶ Returns
true
ifpath
is a block device,false
otherwise.
-
ischardev
(path) → Bool¶ Returns
true
ifpath
is a character device,false
otherwise.
-
isdir
(path) → Bool¶ Returns
true
ifpath
is a directory,false
otherwise.
-
isexecutable
(path) → Bool¶ Returns
true
if the current user has permission to executepath
,false
otherwise.
-
isfifo
(path) → Bool¶ Returns
true
ifpath
is a FIFO,false
otherwise.
-
isfile
(path) → Bool¶ Returns
true
ifpath
is a regular file,false
otherwise.
-
islink
(path) → Bool¶ Returns
true
ifpath
is a symbolic link,false
otherwise.
-
ispath
(path) → Bool¶ Returns
true
ifpath
is a valid filesystem path,false
otherwise.
-
isreadable
(path) → Bool¶ Returns
true
if the current user has permission to readpath
,false
otherwise.
-
issetgid
(path) → Bool¶ Returns
true
ifpath
has the setgid flag set,false
otherwise.
-
issetuid
(path) → Bool¶ Returns
true
ifpath
has the setuid flag set,false
otherwise.
-
issocket
(path) → Bool¶ Returns
true
ifpath
is a socket,false
otherwise.
-
issticky
(path) → Bool¶ Returns
true
ifpath
has the sticky bit set,false
otherwise.
-
iswritable
(path) → Bool¶ Returns
true
if the current user has permission to write topath
,false
otherwise.
-
homedir
() → String¶ Return the current user’s home directory.
-
dirname
(path::String) → String¶ Get the directory part of a path.
-
basename
(path::String) → String¶ Get the file name part of a path.
-
@__FILE__
() → String¶ @__FILE__
expands to a string with the absolute path and file name of the script being run. Returnsnothing
if run from a REPL or an empty string if evaluated byjulia -e <expr>
.
-
isabspath
(path::String) → Bool¶ Determines whether a path is absolute (begins at the root directory).
-
isdirpath
(path::String) → Bool¶ Determines whether a path refers to a directory (for example, ends with a path separator).
-
joinpath
(parts...) → String¶ Join path components into a full path. If some argument is an absolute path, then prior components are dropped.
-
abspath
(path::String) → String¶ Convert a path to an absolute path by adding the current directory if necessary.
-
normpath
(path::String) → String¶ Normalize a path, removing ”.” and ”..” entries.
-
realpath
(path::String) → String¶ Canonicalize a path by expanding symbolic links and removing ”.” and ”..” entries.
-
expanduser
(path::String) → String¶ On Unix systems, replace a tilde character at the start of a path with the current user’s home directory.
-
splitdir
(path::String) -> (String, String)¶ Split a path into a tuple of the directory name and file name.
-
splitdrive
(path::String) -> (String, String)¶ 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.
-
splitext
(path::String) -> (String, 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.
-
tempname
()¶ Generate a unique temporary filename.
-
tempdir
()¶ Obtain the path of a temporary directory.
-
mktemp
()¶ Returns
(path, io)
, wherepath
is the path of a new temporary file andio
is an open file object for this path.
-
mktempdir
()¶ Create a temporary directory and return its path.