The file-attributes Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The file-attributes Reference Manual

This is the file-attributes Reference Manual, version 1.0.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Wed Nov 04 13:28:23 2020 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

## About File-Attributes
This is a small OS portability library to retrieve and set file attributes not supported by the Lisp standard functions.

## How To
Simply use the functions ``access-time``, ``modification-time``, and ``creation-time`` to access the relevant timestamps. Some stamps may not be accessible or modifiable depending on your OS or file system.

In order to manage attribute information, use ``owner``, ``group``, and ``attributes``. The values used are OS specific for these functions, though the attributes flag can be decoded and encoded via a standardised form with ``decode-attributes`` and ``encode-attributes``.

Any of the above operations may signal an error if the file does not exist, is inaccessible, the operation is not possible, or some other failure occurred.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 file-attributes

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://shinmera.github.io/file-attributes

Source Control

(:git "https://github.com/shinmera/file-attributes.git")

Bug Tracker

https://github.com/Shinmera/file-attributes/issues

License

zlib

Description

Access to file attributes (uid, gid, atime, mtime, mod)

Version

1.0.0

Defsystem Dependency

trivial-features

Dependencies
Source

file-attributes.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 file-attributes.asd

Location

file-attributes.asd

Systems

file-attributes (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 file-attributes/package.lisp

Parent

file-attributes (system)

Location

package.lisp

Packages

org.shirakumo.file-attributes


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 file-attributes/protocol.lisp

Dependency

package.lisp (file)

Parent

file-attributes (system)

Location

protocol.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 file-attributes/posix.lisp

If Feature

unix

Dependency

protocol.lisp (file)

Parent

file-attributes (system)

Location

posix.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 file-attributes/linux.lisp

If Feature

linux

Dependency

posix.lisp (file)

Parent

file-attributes (system)

Location

linux.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.6 file-attributes/windows.lisp

If Feature

windows

Dependency

linux.lisp (file)

Parent

file-attributes (system)

Location

windows.lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.7 file-attributes/mezzano.lisp

If Feature

mezzano

Dependency

windows.lisp (file)

Parent

file-attributes (system)

Location

mezzano.lisp


Previous: , Up: Lisp files   [Contents][Index]

3.1.8 file-attributes/documentation.lisp

Dependency

mezzano.lisp (file)

Parent

file-attributes (system)

Location

documentation.lisp


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 org.shirakumo.file-attributes

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *system*

The default system as recognised through feature flags.

Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: access-time FILE

Accesses the last time this file was accessed.

Signals an error if retrieving or setting the information is not possible.

Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Writer

(setf access-time) (function)

Function: (setf access-time) VALUE FILE
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Reader

access-time (function)

Function: attributes FILE

Accesses the attributes of this file.

The attributes are expressed as a positive integer.

Signals an error if retrieving or setting the information is not possible.

The contents of the file attributes are highly system specific and may contain things such as user permissions or file kind information.

See ENCODE-ATTRIBUTES
See DECODE-ATTRIBUTES

Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Writer

(setf attributes) (function)

Function: (setf attributes) VALUE FILE
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Reader

attributes (function)

Function: creation-time FILE

Accesses the time this file was created.

Signals an error if retrieving or setting the information is not possible.

Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Writer

(setf creation-time) (function)

Function: (setf creation-time) VALUE FILE
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Reader

creation-time (function)

Function: decode-attributes ATTRIBUTES &optional SYSTEM

Decodes an integer for attributes of the requested system into a standardised plist of file attributes.

Which flags are be produced is highly dependent on the system, but the
following may appear:

:ARCHIVED
:COMPRESSED
:DEVICE
:DIRECTORY
:ENCRYPTED
:FIFO
:GROUP-EXECUTE
:GROUP-READ
:GROUP-WRITE
:HIDDEN
:INTEGRITY
:LINK
:NO-SCRUB
:NORMAL
:NOT-INDEXED
:OFFLINE
:OTHER-EXECUTE
:OTHER-READ
:OTHER-WRITE
:OWNER-EXECUTE
:OWNER-READ
:OWNER-WRITE
:READ-ONLY
:RECALL
:SET-GROUP
:SET-USER
:SOCKET
:SPARSE
:STICKY
:SYSTEM-FILE
:TEMPORARY
:VIRTUAL

See ENCODE-ATTRIBUTES
See *SYSTEM*

Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Function: encode-attributes ATTRIBUTES &optional SYSTEM

Encodes a plist of file attributes into an integer suitable for the requested system.

See DECODE-ATTRIBUTES
See *SYSTEM*

Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Function: group FILE

Accesses the owning group of this file.

The group is expressed as a positive integer.

Signals an error if retrieving or setting the information is not possible.

Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Writer

(setf group) (function)

Function: (setf group) VALUE FILE
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Reader

group (function)

Function: modification-time FILE

Accesses the last time this file was modified.

Signals an error if retrieving or setting the information is not possible.

Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Writer

(setf modification-time) (function)

Function: (setf modification-time) VALUE FILE
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Reader

modification-time (function)

Function: owner FILE

Accesses the owning user of this file.

The user is expressed as a positive integer.

Signals an error if retrieving or setting the information is not possible.

Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Writer

(setf owner) (function)

Function: (setf owner) VALUE FILE
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Reader

owner (function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: at-fdcwd
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Constant: statx-atime
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Constant: statx-btime
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Constant: statx-gid
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Constant: statx-mode
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Constant: statx-mtime
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Constant: statx-uid
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Special variables

Special Variable: *unix-attributes*
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Special Variable: *windows-attributes*
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Macros

Macro: define-implementable NAME ARGS
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Macro: define-implementation NAME ARGS &body BODY
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Functions

Function: cchmod PATH MODE
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Function: cchown PATH OWNER GROUP
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Function: chmod PATH MODE
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Function: chown PATH UID GID
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Function: cstat PATH BUFFER
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Function: cstatx DIRFD PATH FLAGS MASK STATX
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Function: cutimes PATH TIMES
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Function: debitfield INT &rest BITS
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Function: decode-bitfield INT BITS
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Function: enbitfield LIST &rest BITS
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Function: encode-bitfield FIELD BITS
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Function: enpath PATH
Package

org.shirakumo.file-attributes

Source

protocol.lisp (file)

Function: stat PATH
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Function: statx PATH MASK
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Function: universal->unix UNIVERSAL
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Function: unix->universal UNIX
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Function: utimes PATH ATIME MTIME
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.5 Classes

Class: stat-tclass ()
Package

org.shirakumo.file-attributes

Source

posix.lisp (file)

Direct superclasses
  • translatable-foreign-type (class)
  • foreign-struct-type (class)
Class: statx-tclass ()
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Direct superclasses
  • translatable-foreign-type (class)
  • foreign-struct-type (class)
Class: statx-timestamp-tclass ()
Package

org.shirakumo.file-attributes

Source

linux.lisp (file)

Direct superclasses
  • translatable-foreign-type (class)
  • foreign-struct-type (class)

Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L  
Index Entry  Section

F
File, Lisp, file-attributes.asd: The file-attributes․asd file
File, Lisp, file-attributes/documentation.lisp: The file-attributes/documentation․lisp file
File, Lisp, file-attributes/linux.lisp: The file-attributes/linux․lisp file
File, Lisp, file-attributes/mezzano.lisp: The file-attributes/mezzano․lisp file
File, Lisp, file-attributes/package.lisp: The file-attributes/package․lisp file
File, Lisp, file-attributes/posix.lisp: The file-attributes/posix․lisp file
File, Lisp, file-attributes/protocol.lisp: The file-attributes/protocol․lisp file
File, Lisp, file-attributes/windows.lisp: The file-attributes/windows․lisp file
file-attributes.asd: The file-attributes․asd file
file-attributes/documentation.lisp: The file-attributes/documentation․lisp file
file-attributes/linux.lisp: The file-attributes/linux․lisp file
file-attributes/mezzano.lisp: The file-attributes/mezzano․lisp file
file-attributes/package.lisp: The file-attributes/package․lisp file
file-attributes/posix.lisp: The file-attributes/posix․lisp file
file-attributes/protocol.lisp: The file-attributes/protocol․lisp file
file-attributes/windows.lisp: The file-attributes/windows․lisp file

L
Lisp File, file-attributes.asd: The file-attributes․asd file
Lisp File, file-attributes/documentation.lisp: The file-attributes/documentation․lisp file
Lisp File, file-attributes/linux.lisp: The file-attributes/linux․lisp file
Lisp File, file-attributes/mezzano.lisp: The file-attributes/mezzano․lisp file
Lisp File, file-attributes/package.lisp: The file-attributes/package․lisp file
Lisp File, file-attributes/posix.lisp: The file-attributes/posix․lisp file
Lisp File, file-attributes/protocol.lisp: The file-attributes/protocol․lisp file
Lisp File, file-attributes/windows.lisp: The file-attributes/windows․lisp file

Jump to:   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   D   E   F   G   M   O   S   U  
Index Entry  Section

(
(setf access-time): Exported functions
(setf attributes): Exported functions
(setf creation-time): Exported functions
(setf group): Exported functions
(setf modification-time): Exported functions
(setf owner): Exported functions

A
access-time: Exported functions
attributes: Exported functions

C
cchmod: Internal functions
cchown: Internal functions
chmod: Internal functions
chown: Internal functions
creation-time: Exported functions
cstat: Internal functions
cstatx: Internal functions
cutimes: Internal functions

D
debitfield: Internal functions
decode-attributes: Exported functions
decode-bitfield: Internal functions
define-implementable: Internal macros
define-implementation: Internal macros

E
enbitfield: Internal functions
encode-attributes: Exported functions
encode-bitfield: Internal functions
enpath: Internal functions

F
Function, (setf access-time): Exported functions
Function, (setf attributes): Exported functions
Function, (setf creation-time): Exported functions
Function, (setf group): Exported functions
Function, (setf modification-time): Exported functions
Function, (setf owner): Exported functions
Function, access-time: Exported functions
Function, attributes: Exported functions
Function, cchmod: Internal functions
Function, cchown: Internal functions
Function, chmod: Internal functions
Function, chown: Internal functions
Function, creation-time: Exported functions
Function, cstat: Internal functions
Function, cstatx: Internal functions
Function, cutimes: Internal functions
Function, debitfield: Internal functions
Function, decode-attributes: Exported functions
Function, decode-bitfield: Internal functions
Function, enbitfield: Internal functions
Function, encode-attributes: Exported functions
Function, encode-bitfield: Internal functions
Function, enpath: Internal functions
Function, group: Exported functions
Function, modification-time: Exported functions
Function, owner: Exported functions
Function, stat: Internal functions
Function, statx: Internal functions
Function, universal->unix: Internal functions
Function, unix->universal: Internal functions
Function, utimes: Internal functions

G
group: Exported functions

M
Macro, define-implementable: Internal macros
Macro, define-implementation: Internal macros
modification-time: Exported functions

O
owner: Exported functions

S
stat: Internal functions
statx: Internal functions

U
universal->unix: Internal functions
unix->universal: Internal functions
utimes: Internal functions

Jump to:   (  
A   C   D   E   F   G   M   O   S   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   C   S  
Index Entry  Section

*
*system*: Exported special variables
*unix-attributes*: Internal special variables
*windows-attributes*: Internal special variables

A
at-fdcwd: Internal constants

C
Constant, at-fdcwd: Internal constants
Constant, statx-atime: Internal constants
Constant, statx-btime: Internal constants
Constant, statx-gid: Internal constants
Constant, statx-mode: Internal constants
Constant, statx-mtime: Internal constants
Constant, statx-uid: Internal constants

S
Special Variable, *system*: Exported special variables
Special Variable, *unix-attributes*: Internal special variables
Special Variable, *windows-attributes*: Internal special variables
statx-atime: Internal constants
statx-btime: Internal constants
statx-gid: Internal constants
statx-mode: Internal constants
statx-mtime: Internal constants
statx-uid: Internal constants

Jump to:   *  
A   C   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   F   O   P   S  
Index Entry  Section

C
Class, stat-tclass: Internal classes
Class, statx-tclass: Internal classes
Class, statx-timestamp-tclass: Internal classes

F
file-attributes: The file-attributes system

O
org.shirakumo.file-attributes: The org․shirakumo․file-attributes package

P
Package, org.shirakumo.file-attributes: The org․shirakumo․file-attributes package

S
stat-tclass: Internal classes
statx-tclass: Internal classes
statx-timestamp-tclass: Internal classes
System, file-attributes: The file-attributes system

Jump to:   C   F   O   P   S