Get metadata attributes for a file or directory.
Does not follow symbolic links. Use isSymlink to detect links before calling this if needed.
isSymlink
Returns an object with:
size
number
type
"file"
"directory"
"symlink"
"socket"
"characterSpecial"
"blockSpecial"
"unknown"
permissions
0o644
420
ownerID
groupID
inode
creationDate
modificationDate
Path to inspect. ~ is expanded.
~
Attributes object, or null if the path cannot be accessed.
null
Get metadata attributes for a file or directory.
Does not follow symbolic links. Use
isSymlinkto detect links before calling this if needed.Returns an object with:
size— Size in bytes (number).type— One of"file","directory","symlink","socket","characterSpecial","blockSpecial", or"unknown".permissions— POSIX permission bits as an integer (e.g.0o644=420).ownerID— Owner UID.groupID— Owner GID.inode— Inode number.creationDate— Creation date as seconds since the Unix epoch.modificationDate— Last modification date as seconds since the Unix epoch.