islink
islink(path) -> Bool
Returns true
if path
is a symbolic link, false
otherwise.
Examples
julia> islink("/path/to/symlink")
true
This example checks if the provided path "/path/to/symlink"
is a symbolic link and returns true
.
julia> islink("/path/to/file")
false
In this example, the function returns false
because "/path/to/file"
is not a symbolic link.
Common mistake example:
julia> islink("nonexistent/file")
ERROR: SystemError: no such file or directory (ENOENT)
The error above occurs when the specified path does not exist. Ensure that the path exists before using the islink
function to avoid such errors.
See Also
abspath, basename, chmod, countlines, cp, ctime, dirname, download, evalfile, expanduser, fdio, filemode, filesize, functionloc, gperm, homedir, include_string, isabspath, isblockdev, ischardev, isdir, isdirpath, isexecutable, isfifo, isfile, islink, ismount, ispath, isreadable, issetgid, issetuid, issticky, iswritable, joinpath, less, lstat, mkdir, mkpath, mktemp, mktempdir, mtime, mv, normpath, operm, poll_fd, poll_file, readall, readcsv, readdir, readdlm, readlines, readlink, realpath, relpath, rm, splitdir, splitdrive, splitext, stat, symlink, tempdir, tempname, touch, truncate, uperm, watch_file, writecsv,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.