SNOBOL4STAT(3)
π SNOBOL4STAT(3) β the CSNOBOL4 Manual page you've been waiting for β¨
okay bestie, sit down, hydrate, because we're about to talk about the absolute icon of a file-status interface: snobol4stat π this page lives in the CSNOBOL4 manual and it's giving "let me peek at a file and tell you literally everything about it" energy. no cap.
πΈ NAME πΈ
snobol4stat β file status interface for SNOBOL4 π¦
β¨ SYNOPSYS β¨
(yes bestie, that's how it's spelled up top, we don't fix, we respect π)
-INCLUDE 'stat.sno'
π DESCRIPTION π
so here's the whole vibe. you've got three little besties who will all go look at a file for you:
STAT(path)β returns file status forpath, and it follows symbolic links like a loyal friend who doesn't care what's behind the curtain π«LSTAT(path)β returns file status forpath, but this one returns information on symbolic links β it's the nosy one who's like "no, tell me about the link itself" πFSTAT(fd)β returns file status for the open file descriptorfd. already got it open? slay, we don't need a path π
all three of them hand you back a DATA() object, and that object has the following members, and yes, we're listing every single one, because we don't skip parts in this house π :
ST_DEVβ the device number containing the file π’ST_INOβ the file number within the device π’ST_TYPE_STRβ aSTRINGidentifying the file type. the options are:'-'for a regular file'b'for a block special file (device)'c'for a character special file (device)'d'for a directory'l'for a symbolic link'p'for a named pipe (FIFO)'s'for a local (Unix) domain socket'w'for a whiteout'?'for none of the above
(new in CSNOBOL4 2.1) β¨ iconic addition honestly
ST_TYPEβ anINTEGERidentifying the file type. it's the ordinal value of theST_TYPE_STRresult, kept around for backwards compatibility π«ΆST_MODEβ file "mode" (protection and type) bits πST_NLINKβ the number of (hard) links to the file πST_UIDβ the owner of the file π€ST_GIDβ the group of the file π₯ST_RDEVβ device id for special file π§ST_SIZEβ size in bytes πST_BLOCKSβ size in blocks π§±ST_BLKSIZEβ preferred block size for file I/O βοΈST_ATIMEβ access time in seconds since January 1st, 1970 β°ST_ATIMENSECβ fractional access time in nanoseconds π¬ST_MTIMEβ data modification time in seconds since January 1st, 1970 β°ST_MTIMENSECβ fractional modification time in nanoseconds π¬ST_CTIMEβ metadata change time in seconds since January 1st, 1970 β°ST_CTIMENSECβ fractional change time in nanoseconds π¬
β οΈ important bestie: values will be the empty string if the data is not available. so if you get '' back, that's not a bug, that's just the truth being withheld from us π
π¦ SEE ALSO π¦
snobol4(1), stat(2), lstat(2), fstat(2) β go read your other besties too, iykyk π
π AUTHOR π
Philip L. Budne β absolute legend, we stan π«Ά
and that's the whole page, bestie!! this one's from <b>CSNOBOL4B 2.3.1</b>, dated <b>March 31, 2022</b> β so it's vintage but she still eats π β¨ no notes, periodt. ππβ
π¦ where this page comes from
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms