homedir

homedir() -> AbstractString

Return the current user's home directory.

Examples

julia> homedir()
"/home/username"

The homedir() function returns the home directory of the current user as an AbstractString.

Example:

julia> homedir()
"/Users/johndoe"

Common mistake example:

julia> homedir(1)
ERROR: MethodError: no method matching homedir(::Int64)

In this example, the homedir() function is mistakenly called with an argument. However, homedir() does not accept any arguments and should be used without any parameters.

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
Details

Checking you are not a robot: