(index ("stat-inode" 0) ("stat-permissions" 94) ("stat-mode" 613) ("stat-mode-type" 832) ("stat-links" 1246) ("stat-owner" 1348) ("stat-group" 1445) ("stat-size" 1543) ("stat-access-time" 1641) ("stat-change-time" 1641) ("stat-modification-time" 1641) ("stat-device" 1924) ("stat-device-number" 2160) ("stat-block-size" 2951) ("stat-blocks" 3176) ("stat-type" 3378) ("stat-regular-file?" 3657) ("stat-symbolic-link?" 3788) ("stat-block-device?" 3922) ("stat-character-device?" 4053) ("stat-fifo?" 4196) ("stat-socket?" 4303) ("stat-directory?" 4416) ("stat/ifmt" 4600) ("stat/ififo" 4600) ("stat/ifchr" 4600) ("stat/ifdir" 4600) ("stat/ifblk" 4600) ("stat/ifreg" 4600) ("stat/iflnk" 4600) ("stat/ifsock" 4600) ("change-link-mode" 5142) ("change-link-owner" 5426) ("change-file-times" 5733) ("file-access-time" 6032) ("set!" 6032) ("create-special-file" 6444) ("create-block-device" 7099) ("create-character-device" 7099) ("device-major" 7684) ("device-minor" 7823) ("make-device-number" 7962) ("resolve-pathname" 8345) ("sleep" 8815))
(def (sig (procedure "(stat-inode s)" (id stat-inode))) (p "Inode number of stat vector S."))
(def (sig (procedure "(stat-permissions s)" (id stat-permissions))) (p "Permissions of stat vector S.  You can test this value by performing bitwise operations on the result and the " (int-link "/manual/Unit posix#Permission bits" ((tt "perm/..."))) " values from Unit posix.") (p "For compatibility with " (tt "file-permissions") ", this returns the entire mode field, which happens to include the file type.  You can use " (tt "stat-mode") " and " (tt "stat-mode-type") " to get the file mode and type separately."))
(def (sig (procedure "(stat-mode s)" (id stat-mode))) (p "Like " (tt "stat-permissions") ", but return only the file mode (permission) bits from the mode field.") (pre "(number->string (stat-mode s) 8)\n; => \"644\""))
(def (sig (procedure "(stat-mode-type s)" (id stat-mode-type))) (p "Return only the file type bits from the mode field of stat vector S. You can then use equality operations with file type constants such as " (tt "stat/ififo") ".  However, it is probably better to use the wrappers " (tt "stat-type") " and " (tt "stat-fifo?") ", etc.") (pre "(= stat/ifdir (stat-mode-type (file-stat \"~/.emacs.d\")))\n; => #t"))
(def (sig (procedure "(stat-links s)" (id stat-links))) (p "Number of hard links of stat vector S."))
(def (sig (procedure "(stat-owner s)" (id stat-owner))) (p "Numeric user id of stat vector S."))
(def (sig (procedure "(stat-group s)" (id stat-group))) (p "Numeric group id of stat vector S."))
(def (sig (procedure "(stat-size s)" (id stat-size))) (p "File size in bytes of stat vector S."))
(def (sig (procedure "(stat-access-time s)" (id stat-access-time)) (procedure "(stat-change-time s)" (id stat-change-time)) (procedure "(stat-modification-time s)" (id stat-modification-time))) (p "Access, change or modification time of stat vector S in seconds since UNIX epoch."))
(def (sig (procedure "(stat-device s)" (id stat-device))) (p "Device number of the device that stat vector S resides on.  Compare with " (tt "stat-device-number") ".") (p "Not valid on Windows, where it returns an unspecified value."))
(def (sig (procedure "(stat-device-number s)" (id stat-device-number))) (p "Device number of the block- or character- special file represented by stat vector S.  The device number can be deconstructed with " (tt "device-major") " and " (tt "device-minor") ".  For all other file types, the device number is 0.") (p (b "Warning") ": Due to a limitation in Chicken, only 30 bits of the device number are recorded in the stat vector on 32-bit systems (this is raised to 32 bits on 64-bit systems; technically speaking, its foreign type is " (tt "unsigned-int") ").  Although 32-bit device numbers are most common, some platforms such as Linux may use 64-bit numbers. Therefore, the device number may be somewhat unreliable.") (p "Not valid on Windows, where it returns an unspecified value."))
(def (sig (procedure "(stat-block-size s)" (id stat-block-size))) (p "Returns the \"optimal\" block size for I/O on the file represented by stat vector S.") (p "Not valid on Windows, where it returns an unspecified value."))
(def (sig (procedure "(stat-blocks s)" (id stat-blocks))) (p "Number of blocks allocated for the file represented by stat vector S.") (p "Not valid on Windows, where it returns an unspecified value."))
(def (sig (procedure "(stat-type s)" (id stat-type))) (p "File type for stat vector S as a symbol, one of:") (pre "regular-file\ndirectory\nfifo\nsocket\nsymbolic-link\ncharacter-device\nblock-device") (pre ";; Example\n\n(stat-type (file-stat \"~/.emacs.d\"))\n;=> directory"))
(def (sig (procedure "(stat-regular-file? s)" (id stat-regular-file?))) (p "Like " (tt "regular-file?") " but for stat vectors."))
(def (sig (procedure "(stat-symbolic-link? s)" (id stat-symbolic-link?))) (p "Like " (tt "symbolic-link?") " but for stat vectors."))
(def (sig (procedure "(stat-block-device? s)" (id stat-block-device?))) (p "Like " (tt "block-device?") " but for stat vectors."))
(def (sig (procedure "(stat-character-device? s)" (id stat-character-device?))) (p "Like " (tt "character-device?") " but for stat vectors."))
(def (sig (procedure "(stat-fifo? s)" (id stat-fifo?))) (p "Like " (tt "fifo?") " but for stat vectors."))
(def (sig (procedure "(stat-socket? s)" (id stat-socket?))) (p "Like " (tt "socket?") " but for stat vectors."))
(def (sig (procedure "(stat-directory? s)" (id stat-directory?))) (p "Like " (tt "directory?") " but for stat vectors.") (pre "(stat-directory? (file-stat \"~/.emacs.d\"))\n; => #t"))
(def (sig (constant "stat/ifmt" (id stat/ifmt)) (constant "stat/ififo" (id stat/ififo)) (constant "stat/ifchr" (id stat/ifchr)) (constant "stat/ifdir" (id stat/ifdir)) (constant "stat/ifblk" (id stat/ifblk)) (constant "stat/ifreg" (id stat/ifreg)) (constant "stat/iflnk" (id stat/iflnk)) (constant "stat/ifsock" (id stat/ifsock))) (p "Constants used with " (tt "stat-mode-type") " to get the type of file. Consult " (tt "stat(2)") " for more information and note that, for example, " (tt "stat/ifdir") " corresponds to " (tt "S_IFDIR") "."))
(def (sig (procedure "(change-link-mode filename mode)" (id change-link-mode))) (p "Change the mode of symbolic link FILENAME to numeric MODE via the " (tt "lchmod()") " C library function.  This system call is only implemented on some platforms; it will raise an error otherwise."))
(def (sig (procedure "(change-link-owner filename uid gid)" (id change-link-owner))) (p "Change the owner and group of symbolic link FILENAME to numeric UID and GID via the " (tt "lchown()") " C library function.  This system call is only implemented on some platforms; it will raise an error otherwise."))
(def (sig (procedure "(change-file-times filename atime mtime)" (id change-file-times))) (p "Change the access and modification times on " (tt "filename") " to " (tt "atime") " and " (tt "mtime") ", respectively.") (p "Note that " (tt "atime") " and " (tt "mtime") " must be within 32-bit range."))
(def (sig (procedure "(file-access-time filename)" (id file-access-time)) (setter "(set! (file-access-time FILE) SECONDS)" (id set!))) (p "Gets or sets the access time on FILENAME.") (p "On most platforms modification and access time must be set together, so this usually incurs a separate call to get the current modification time. For efficiency, use " (tt "change-file-times") " when you want to set both."))
(def (sig (procedure "(create-special-file filename mode devnum #!optional minor)" (id create-special-file))) (p "Create a special file node called FILENAME with numeric mode MODE. DEVNUM is the desired device number and is relevant for block and character devices only; a device number can be constructed with " (tt "make-device-number") ".  Device numbers created in this manner are restricted to 32 bits only.") (p "If the optional MINOR argument is provided, then DEVNUM is taken as the major device number, and MINOR as the minor number.  In this case, the resulting device number will be not be subject to the 32-bit restriction mentioned above."))
(def (sig (procedure "(create-block-device filename major minor #!optional (mode #o666))" (id create-block-device)) (procedure "(create-character-device filename major minor #!optional (mode #o666))" (id create-character-device))) (p "Create a block or character device called FILENAME having major device number MAJOR and minor device number MINOR.  The optional creation MODE may also be specified via " (tt "perm/...") " bits or directly in octal, and defaults to #o666, subject to your current umask.") (p "These are merely convenient aliases to " (tt "create-special-file") "."))
(def (sig (procedure "(device-major devnum)" (id device-major))) (p "Extract and return the major number from the device number DEVNUM."))
(def (sig (procedure "(device-minor devnum)" (id device-minor))) (p "Extract and return the minor number from the device number DEVNUM."))
(def (sig (procedure "(make-device-number major minor)" (id make-device-number))) (p "Create a single device number from the given device MAJOR and MINOR IDs.") (p "Note: The resulting device number is capped at 32 bits even on platforms with 64-bit device IDs.  You can still, however, create files with full-width device numbers with " (tt "create-special-file") " and friends."))
(def (sig (procedure "(resolve-pathname p)" (id resolve-pathname))) (p "Resolve all " (tt "./") ", " (tt "../") " and symbolic references in relative or absolute pathname string P.  All components in the path must exist. Returns an absolute pathname string, or signals an error if (for example) a path component is missing.") (p "Platform notes: Solaris is reported to return a relative pathname in some instances.  Unimplemented on Windows and will signal an error."))
(def (sig (procedure "(sleep seconds)" (id sleep))) (p "Puts the process to sleep for " (i "seconds") ", which is an inexact number (that is, may include a fractional number of seconds).  The " (i "sleep") " from Unit posix only supports whole seconds.") (p "Returns either 0 if the time has completely elapsed, or the number of remaining seconds, if a signal occurred.") (pre "(sleep 1.4)"))
