SNOBOL4STAT(3)

πŸ“¦
version 2.3.1 Β· 3 versions
, in fedora 43, fedora 44, opensuse-leap 16.0

πŸ’… 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 for path, and it follows symbolic links like a loyal friend who doesn't care what's behind the curtain πŸ’«
  • LSTAT(path) β€” returns file status for path, 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 descriptor fd. 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 β€” a STRING identifying 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 β€” an INTEGER identifying the file type. it's the ordinal value of the ST_TYPE_STR result, 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