ismount(path) -> Bool

Returns true if path is a mount point, false otherwise.


  1. Check if a path is a mount point:

    julia> ismount("/mnt")

    This example checks if the path "/mnt" is a mount point.

  2. Check if a path is not a mount point:

    julia> ismount("/home/user/documents")

    It returns false as "/home/user/documents" is not a mount point.

  3. Use a variable to check multiple paths:
    julia> path1 = "/mnt"
    julia> path2 = "/var/log"
    julia> ismount(path1)
    julia> ismount(path2)

    This example demonstrates using variables to check multiple paths for mount points.

Common mistake example:

julia> ismount("/nonexistent/path")
ERROR: IOError: stat: no such file or directory (ENOENT)

Here, the provided path does not exist, resulting in an IOError. Ensure that the path exists before using ismount 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.

*Required Field

Checking you are not a robot: