The nfiles Reference Manual

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

The nfiles Reference Manual

This is the nfiles Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Sep 15 05:43:35 2022 GMT+0.

Table of Contents


1 Systems

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


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

1.1 nfiles

Manage file persistence and loading.

Author

Atlas Engineer LLC

Home Page

https://github.com/atlas-engineer/nfiles

License

BSD 3-Clause

Version

1.0.0

Dependencies
  • alexandria (system).
  • hu.dwim.defclass-star (system).
  • quri (system).
  • serapeum (system).
  • trivial-garbage (system).
  • trivial-package-local-nicknames (system).
  • trivial-types (system).
Source

nfiles.asd.

Child Components

2 Files

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


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

2.1 Lisp


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

2.1.1 nfiles/nfiles.asd

Source

nfiles.asd.

Parent Component

nfiles (system).

ASDF Systems

nfiles.


2.1.2 nfiles/pathname-helpers.lisp

Source

nfiles.asd.

Parent Component

nfiles (system).

Packages

nfiles/pathname.

Public Interface
Internals

2.1.3 nfiles/package.lisp

Source

nfiles.asd.

Parent Component

nfiles (system).

Packages

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

2.1.4 nfiles/conditions.lisp

Source

nfiles.asd.

Parent Component

nfiles (system).

Public Interface
Internals

read-error (condition).


2.1.5 nfiles/gpg.lisp

Source

nfiles.asd.

Parent Component

nfiles (system).

Public Interface
Internals

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

2.1.6 nfiles/nfiles.lisp

Source

nfiles.asd.

Parent Component

nfiles (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


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

3.1 nfiles/pathname

Some ‘cl:pathname’ helpers.

Source

pathname-helpers.lisp.

Use List

common-lisp.

Used By List

nfiles.

Public Interface
Internals

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

3.2 nfiles

The main data structures are ‘nfiles:file’ and ‘nfiles:profile’.
Call ‘nfiles:expand’ to return the final ‘nfiles:file’ path.
Call ‘nfiles:content’ (setf-able) to get the ‘nfiles:file’ content.

A basic session:

(defvar *config-file* (make-instance ’nfiles:config-file :base-path #p"my-app/init.lisp"))

(nfiles:expand *config-file*)
; => #P"/home/johndoe/.config/my-app/init.lisp"

(setf (nfiles:content *config-file*) "Hello file!") ; The file is written to disk.

(nfiles:content *config-file*)
; => "Hello file!"

The following convenience macro ensures the file is updated when done with the
body:

(nfiles:with-file-content (content *config-file*)
(format t "Length: ~a~%" (length content))
(setf content (serapeum:string-replace "file" content "config")))

The ‘nfiles:with-paths’ helper allows for let-style bindings of the expanded paths:

(let ((file1 (make-instance ’nfiles:file))
(file2 (make-instance ’nfiles:file :base-path #p"alt")))
(nfiles:with-paths ((path1 file1)
(path2 file2))
(list path1 path2)))

Specialize ‘nfiles:resolve’ to configure how a file path is expanded depending
on the file type and the ‘nfiles:profile’.

The content serialization and deserialization can be specialized via the
‘nfiles:serialize’ and ‘nfiles:deserialize’ methods.

The file reading and writing can be specialized via the ‘nfiles:read-file’ and
‘nfiles:write-file’ methods. These specializations are in charge for calling
the (de)serialization methods.

A ‘nfiles:remote-file’ works the same but needs some specialization to handle
the remote fetching and checksum validation:

(defmethod nfiles:fetch ((profile nfiles:profile) (file remote-counter-file) &key)
(dex:get (nfiles:url file)))

;; Optional:
(defmethod nfiles:check ((profile nfiles:profile) (file remote-counter-file) content &key)
(let ((path (nfiles:expand file)))
(ironclad:byte-array-to-hex-string
(ironclad:digest-file :sha3 path))))

(let ((file (make-instance ’nfiles:remote-file
;; The URL to download from if the file is not found on disk.
:url (quri:uri "https://example.org")
;; Without base-path, the file won’t be saved to disk.
:base-path #p"/tmp/index.html"
:checksum "794df316afac91572b899b52b54f53f04ef71f275a01c44b776013573445868c95317fc4a173a973e90addec7792ff8b637bdd80b1a6c60b03814a6544652a90"))) ;; On access, file is automatically downloaded if needed and the checksum is verified:
(nfiles:content file)
;; ...
)

A word of caution: sometimes you may need the handle both the raw form and the
deserialized form. Then what should ‘nfiles:content’ return?

In this use case, your class has 2 semantic values: that of carrying the raw
form and that of being an ‘nfiels:file’ which carries the deserialized form.
To keep things simple, use a dedicated slot to store the raw form.
For instance ‘nfiles:remote-file’ has a ‘nfiles:url-content’ slot. If your file
is stored remotely, a ‘nfiles:remote-file’ gives access to both forms.

Also avoid calling ‘nfiles:content’ (or its setf-function) in the
‘nfiles:read-file’ - ‘nfiles:deserialize’ / ‘nfiles:write-file’ -
‘nfiles:serialize’ pipeline as it would make it horribly confusing to the
user (and probably break the logic).

Source

package.lisp.

Use List
Public Interface
Internals

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

3.3 nfiles/gpg

A thin wrapper around the GPG command line tool. Do not expect too much from it.

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

4 Definitions

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


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

4.1 Public Interface


Next: , Previous: , Up: Public Interface   [Contents][Index]

4.1.1 Special variables

Special Variable: *default-profile*
Package

nfiles.

Source

nfiles.lisp.

Special Variable: *gpg-default-recipient*
Package

nfiles/gpg.

Source

gpg.lisp.

Special Variable: *gpg-program*
Package

nfiles/gpg.

Source

gpg.lisp.


4.1.2 Macros

Macro: with-file-content ((content file &key default) &body body)

Bind CONTENT to FILE’s content in BODY.
In case there’s no content, bind CONTENT to DEFAULT. The new value of CONTENT is saved to FILE on exit.

Package

nfiles.

Source

nfiles.lisp.

Macro: with-gpg-file ((var pathname &rest keys) &body body)

Trivial wrapper around ‘call-with-gpg-file’.

Package

nfiles/gpg.

Source

gpg.lisp.

Macro: with-paths (bindings &body body)

Bind let-style BINDINGS to ‘file’ path expansions, then run BODY if all these paths or non-nil after ‘nil-pathname-p’.

Package

nfiles.

Source

nfiles.lisp.


4.1.3 Ordinary functions

Function: all-files (&rest packages)

Return all instantiated ‘file’ objects belonging to PACKAGES. If no package is specified, return all ‘file’ objects.

Package

nfiles.

Source

nfiles.lisp.

Function: backup (path)

Rename PATH to a file of the same name with a unique suffix appended. The file is guaranteed to not conflict with any existing file.

Package

nfiles.

Source

nfiles.lisp.

Function: basename (pathname)

Return the basename, that is:
- if it’s a directory, the name of the directory,
- if it’s a file, the name of the file including its type (extension), - nil if it’s a nil-pathname (#p"").

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: content (file &key force-read force-update skip-update wait-p)

Return the content of FILE.
When FORCE-READ is non-nil, the cache is skipped and the file is re-read.
When FORCE-UPDATE is non-nil, the file is re-downloaded if it’s a ‘remote-file’. When SKIP-UPDATE is non-nil, the file is not re-downloaded if it’s present locally.

The read is asynchronous. By default, ‘content’ waits for the read to finish before returning the result. But if ‘wait-p’ is nil, it returns directly
with (VALUES NIL THREAD) if the reading THREAD is not done yet.

Package

nfiles.

Source

nfiles.lisp.

Function: (setf content) (file)

Set FILE content to VALUE and persist change to disk.
While the content of the FILE object is updated instantly, the file is persisted in the background.

This is a user-facing function, you should probably not try to call it from one of the specialized methods as this would set the logic upside down.

Return a ‘bt:thread’ object. Call ‘bt:join-thread’ on it to know when it’s done writing the file.

Package

nfiles.

Source

nfiles.lisp.

Function: directory-pathname-p (pathname)

Like ‘uiop:directory-pathname-p’ but also return T if ‘pathname-name’ is "." and check for existence.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: ensure-type (path type)

Return PATH with type set to TYPE, if it’s not already the case. Case is ignored.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: exists-p (file)
Package

nfiles.

Source

nfiles.lisp.

Function: expand (file)

Return the pathname corresponding to FILE and its ‘profile’.
It’s a convenience wrapper around ‘resolve’ (to avoid specifying the ‘profile’).

Package

nfiles.

Source

nfiles.lisp.

Function: file-group (path)

Return PATH group name.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: (setf file-group) (path)

Set PATH group to NEW-GROUP (a string).

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: file-user (path)

Return PATH owner name.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: (setf file-user) (path)

Set PATH owner to NEW-USER (a string).

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: gpg-private-keys ()

Return list of private ‘gpg-key’s.

Package

nfiles/gpg.

Source

gpg.lisp.

Function: join (&rest paths)

Concatenate PATHS.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: nil-pathname-p (pathname)

Return non-nil if PATHNAME is ‘uiop:*nil-pathname*’ or nil.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: parent (path)

Return the parent directory of PATH.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: pathname-type* (pathname)

Like ‘pathname-type’ but return NIL instead of "" or :UNSPECIFIC.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: permissions (path)

Return a list of permissions as per ‘+permissions+’.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: (setf permissions) (path)

Set the PERMISSIONS or PATH as per ‘+permissions+’.

Package

nfiles/pathname.

Source

pathname-helpers.lisp.


4.1.4 Generic functions

Generic Reader: algorithm (object)
Package

nfiles/gpg.

Methods
Reader Method: algorithm ((gpg-key gpg-key))

automatically generated reader method

Source

gpg.lisp.

Target Slot

algorithm.

Generic Writer: (setf algorithm) (object)
Package

nfiles/gpg.

Methods
Writer Method: (setf algorithm) ((gpg-key gpg-key))

automatically generated writer method

Source

gpg.lisp.

Target Slot

algorithm.

Generic Reader: base-path (object)
Package

nfiles.

Methods
Reader Method: base-path ((file file))

The pathname used by the ‘resolve’ method to yield the final path.

Source

nfiles.lisp.

Target Slot

base-path.

Generic Function: check (profile file content &key &allow-other-keys)

Check CONTENT when FILE’s ‘checksum’ is non-empty.
This is meant to return a string which is then automatically compared to ‘checksum’.

Package

nfiles.

Source

nfiles.lisp.

Methods
Method: check :around ((profile profile) (file file) content &key)
Generic Reader: checksum (object)
Generic Writer: (setf checksum) (object)
Package

nfiles.

Methods
Reader Method: checksum ((remote-file remote-file))
Writer Method: (setf checksum) ((remote-file remote-file))

If non-empty, the ‘check’ method is called on download against the resulting data. If it does not match the ‘checksum’, raise an error.
This probably only makes sense for immutable data, thus ‘update-interval’ ought to be 0.

Source

nfiles.lisp.

Target Slot

checksum.

Generic Reader: creation-date (object)
Generic Writer: (setf creation-date) (object)
Package

nfiles/gpg.

Methods
Reader Method: creation-date ((gpg-key gpg-key))
Writer Method: (setf creation-date) ((gpg-key gpg-key))

Stored as in Unix format.

Source

gpg.lisp.

Target Slot

creation-date.

Generic Function: deserialize (profile file stream &key &allow-other-keys)

Transform STREAM into a useful form ready to be manipulated on the Lisp side. The STREAM is provided by ‘read-file’.

See ‘serialize’ for the reverse action.

Package

nfiles.

Source

nfiles.lisp.

Methods
Method: deserialize ((profile virtual-profile) (file file) stream &key)
Method: deserialize ((profile profile) (file virtual-file) stream &key)
Method: deserialize ((profile profile) (file lisp-file) stream &key)
Method: deserialize :around ((profile profile) (file file) stream &key)

Handle errors gracefully. See ‘on-deserialization-error’.

Method: deserialize ((profile profile) (file file) stream &key)
Generic Reader: expiry-date (object)
Generic Writer: (setf expiry-date) (object)
Package

nfiles/gpg.

Methods
Reader Method: expiry-date ((gpg-key gpg-key))
Writer Method: (setf expiry-date) ((gpg-key gpg-key))

Stored as in Unix format.

Source

gpg.lisp.

Target Slot

expiry-date.

Generic Function: fetch (profile file &key &allow-other-keys)

Download the FILE ‘url’ and return the result as a string.

Package

nfiles.

Source

nfiles.lisp.

Generic Reader: fingerprint (object)
Package

nfiles/gpg.

Methods
Reader Method: fingerprint ((gpg-key gpg-key))

automatically generated reader method

Source

gpg.lisp.

Target Slot

fingerprint.

Generic Writer: (setf fingerprint) (object)
Package

nfiles/gpg.

Methods
Writer Method: (setf fingerprint) ((gpg-key gpg-key))

automatically generated writer method

Source

gpg.lisp.

Target Slot

fingerprint.

Generic Reader: key-id (object)
Package

nfiles/gpg.

Methods
Reader Method: key-id ((gpg-key gpg-key))

automatically generated reader method

Source

gpg.lisp.

Target Slot

key-id.

Generic Writer: (setf key-id) (object)
Package

nfiles/gpg.

Methods
Writer Method: (setf key-id) ((gpg-key gpg-key))

automatically generated writer method

Source

gpg.lisp.

Target Slot

key-id.

Generic Reader: key-length (object)
Package

nfiles/gpg.

Methods
Reader Method: key-length ((gpg-key gpg-key))

automatically generated reader method

Source

gpg.lisp.

Target Slot

key-length.

Generic Writer: (setf key-length) (object)
Package

nfiles/gpg.

Methods
Writer Method: (setf key-length) ((gpg-key gpg-key))

automatically generated writer method

Source

gpg.lisp.

Target Slot

key-length.

Generic Reader: keygrip (object)
Package

nfiles/gpg.

Methods
Reader Method: keygrip ((gpg-key gpg-key))

automatically generated reader method

Source

gpg.lisp.

Target Slot

keygrip.

Generic Writer: (setf keygrip) (object)
Package

nfiles/gpg.

Methods
Writer Method: (setf keygrip) ((gpg-key gpg-key))

automatically generated writer method

Source

gpg.lisp.

Target Slot

keygrip.

Generic Reader: name (object)
Generic Writer: (setf name) (object)
Package

nfiles.

Methods
Reader Method: name ((file file))
Writer Method: (setf name) ((file file))

Name used to identify the object in a human-readable manner.

Source

nfiles.lisp.

Target Slot

name.

Reader Method: name ((profile profile))
Writer Method: (setf name) ((profile profile))

The name of the profile to refer it with.

Source

nfiles.lisp.

Target Slot

name.

Generic Reader: on-deserialization-error (object)
Generic Writer: (setf on-deserialization-error) (object)
Package

nfiles.

Methods
Reader Method: on-deserialization-error ((file file))
Writer Method: (setf on-deserialization-error) ((file file))

What to do on deserialization error.
The offending file may be backed up with the ‘backup’ function.
Or it may simply be ‘delete’d.
‘ask’ leaves the condition unhandled, so unless you handle it, it will prompt the debugger with the other options.

Source

nfiles.lisp.

Target Slot

on-deserialization-error.

Generic Reader: on-external-modification (object)
Generic Writer: (setf on-external-modification) (object)
Package

nfiles.

Methods
Reader Method: on-external-modification ((file file))
Writer Method: (setf on-external-modification) ((file file))

Whether to reload or overwrite the file if it was modified since it was last loaded.

Source

nfiles.lisp.

Target Slot

on-external-modification.

Generic Reader: on-fetch-error (object)
Generic Writer: (setf on-fetch-error) (object)
Package

nfiles.

Methods
Reader Method: on-fetch-error ((remote-file remote-file))
Writer Method: (setf on-fetch-error) ((remote-file remote-file))

What to do when the file download failed.

Source

nfiles.lisp.

Target Slot

on-fetch-error.

Generic Reader: on-invalid-checksum (object)
Generic Writer: (setf on-invalid-checksum) (object)
Package

nfiles.

Methods
Reader Method: on-invalid-checksum ((remote-file remote-file))
Writer Method: (setf on-invalid-checksum) ((remote-file remote-file))

What to do when the downloaded content does not match ‘checksum’.

Source

nfiles.lisp.

Target Slot

on-invalid-checksum.

Generic Reader: on-read-error (object)
Generic Writer: (setf on-read-error) (object)
Package

nfiles.

Methods
Reader Method: on-read-error ((file file))
Writer Method: (setf on-read-error) ((file file))

What to do on file read error.
See ‘on-deserialization-error’ for the meaning of the different actions.

Source

nfiles.lisp.

Target Slot

on-read-error.

Generic Reader: profile (object)
Package

nfiles.

Methods
Reader Method: profile ((file file))

The ‘profile’ of the ‘file’.
File expansion is performed against it. The profile is only set at instantiation time.

Source

nfiles.lisp.

Target Slot

profile.

Generic Function: read-file (profile file &key force-update skip-update &allow-other-keys)

Load FILE by calling ‘deserialize’ on a stream opened on the file. The specialized method is in charge for calling ‘deserialize’. See ‘write-file’ for the reverse action.

Package

nfiles.

Source

nfiles.lisp.

Methods
Method: read-file ((profile virtual-profile) (file file) &key)

Don’t load anything when using the ‘virtual-profile’.

Method: read-file ((profile profile) (file virtual-file) &key)

Don’t load anything for virtual files.

Method: read-file ((profile profile) (file gpg-file) &key)

Decrypt FILE with GPG and return resulting stream. See ‘*gpg-default-recipient*’.

Method: read-file ((profile profile) (file file) &key)

Open FILE and call ‘deserialize’ on its content.

Method: read-file :around ((profile profile) (file remote-file) &key force-update skip-update)

Try to download the file from its ‘url’ if it does not exist.

If file is already on disk and younger than ‘update-interval’, call next ‘read-file’ method instead of fetching online.

Method: read-file :around ((profile profile) (file file) &key)

Don’t try to load the file if it does not exist.

Generic Reader: read-handler (object)
Generic Writer: (setf read-handler) (object)
Package

nfiles.

Methods
Reader Method: read-handler ((file file))
Writer Method: (setf read-handler) ((file file))

Function of one argument, the condition that may be raised in the reader thread.

Source

nfiles.lisp.

Target Slot

read-handler.

Generic Function: resolve (profile file)

Return the final expanded path for ‘file’ depending on its ‘profile’.
This method is meant to be specialized against the user-defined ‘profile’s and ‘file’s. See ‘expand’ for a convenience wrapper.

Package

nfiles.

Source

nfiles.lisp.

Methods
Method: resolve ((profile profile) (file runtime-file))
Method: resolve ((profile profile) (file data-file))
Method: resolve ((profile profile) (file cache-file))
Method: resolve ((profile profile) (file config-file))
Method: resolve ((profile profile) (file gpg-lisp-file))

Ensure the extension is .lisp or .lisp.gpg.

Method: resolve ((profile profile) (file lisp-file))

Append the ’.lisp’ extension if not already present.

Method: resolve :around ((profile profile) (file file))

Clean up the result before returning it.

Method: resolve ((profile profile) (file file))
Generic Function: serialize (profile file stream &key &allow-other-keys)

Transform ‘file’ content in a form meant to be persisted to a file. For the actual writing to disk, see ‘write-file’.

See ‘deserialize’ for the reverse action.

Package

nfiles.

Source

nfiles.lisp.

Methods
Method: serialize ((profile read-only-profile) (file file) stream &key)
Method: serialize ((profile profile) (file read-only-file) stream &key)
Method: serialize ((profile profile) (file lisp-file) stream &key)
Method: serialize :around ((profile profile) (file file) stream &key)
Method: serialize ((profile profile) (file file) stream &key)
Generic Reader: uids (object)
Package

nfiles/gpg.

Methods
Reader Method: uids ((gpg-key gpg-key))

automatically generated reader method

Source

gpg.lisp.

Target Slot

uids.

Generic Writer: (setf uids) (object)
Package

nfiles/gpg.

Methods
Writer Method: (setf uids) ((gpg-key gpg-key))

automatically generated writer method

Source

gpg.lisp.

Target Slot

uids.

Generic Reader: update-interval (object)
Generic Writer: (setf update-interval) (object)
Package

nfiles.

Methods
Reader Method: update-interval ((remote-file remote-file))
Writer Method: (setf update-interval) ((remote-file remote-file))

Re-download the file after this amount of seconds has elapsed since last update.
If 0, disable automatic re-download.

Source

nfiles.lisp.

Target Slot

update-interval.

Generic Reader: url (object)
Generic Writer: (setf url) (object)
Package

nfiles.

Methods
Reader Method: url ((remote-file remote-file))
Writer Method: (setf url) ((remote-file remote-file))

URL from where to download the file.
If empty, then this behaves just like a regular ‘file’.

Source

nfiles.lisp.

Target Slot

url.

Generic Reader: url-content (object)
Generic Writer: (setf url-content) (object)
Package

nfiles.

Methods
Reader Method: url-content ((remote-file remote-file))
Writer Method: (setf url-content) ((remote-file remote-file))

The content of the downloaded file.
This is useful if you want to maintain both the raw content and the deserialized content.

Source

nfiles.lisp.

Target Slot

url-content.

Generic Reader: user-id (object)
Package

nfiles/gpg.

Methods
Reader Method: user-id ((gpg-uid gpg-uid))

automatically generated reader method

Source

gpg.lisp.

Target Slot

user-id.

Generic Writer: (setf user-id) (object)
Package

nfiles/gpg.

Methods
Writer Method: (setf user-id) ((gpg-uid gpg-uid))

automatically generated writer method

Source

gpg.lisp.

Target Slot

user-id.

Generic Reader: validity (object)
Package

nfiles/gpg.

Methods
Reader Method: validity ((gpg-uid gpg-uid))

automatically generated reader method

Source

gpg.lisp.

Target Slot

validity.

Generic Writer: (setf validity) (object)
Package

nfiles/gpg.

Methods
Writer Method: (setf validity) ((gpg-uid gpg-uid))

automatically generated writer method

Source

gpg.lisp.

Target Slot

validity.

Generic Function: write-file (profile file &key destination &allow-other-keys)

Persist FILE to disk.
DESTINATION is set by default to a staged pathname (using ‘uiop:with-staging-pathname’) which is renamed to the final name (the result of ‘expand’ on FILE) if everything went well.
This guarantees that on error the original file is left untouched.

The specialized method is in charge for calling ‘serialize’.

See ‘read-file’ for the reverse action.

Package

nfiles.

Source

nfiles.lisp.

Methods
Method: write-file ((profile read-only-profile) (file file) &key destination)

Don’t write anything when using the ‘read-only-profile’.

Method: write-file ((profile profile) (file read-only-file) &key destination)

Don’t write anything for ‘read-only-file’.

Method: write-file ((profile profile) (file gpg-file) &key destination)

Crypt to FILE with GPG. See ‘*gpg-default-recipient*’.

Method: write-file ((profile profile) (file file) &key destination)

Write the result of ‘serialize’ to the ‘file’ path.

Method: write-file :around ((profile profile) (file file) &key destination)

Perform some checks before performing the actual write:
- Preserve permissions.
- If FILE expands to ‘uiop:*nil-pathname*’ or a directory, do nothing.

Generic Reader: write-handler (object)
Generic Writer: (setf write-handler) (object)
Package

nfiles.

Methods
Reader Method: write-handler ((file file))
Writer Method: (setf write-handler) ((file file))

Function of one argument, the condition that may be raised in the writer thread.

Source

nfiles.lisp.

Target Slot

write-handler.


4.1.5 Standalone methods

Method: initialize-instance :after ((file file) &key base-path)
Source

nfiles.lisp.

Method: initialize-instance :after ((entry cache-entry) &key force-update skip-update)
Source

nfiles.lisp.


4.1.6 Conditions

Condition: external-modification
Package

nfiles.

Source

conditions.lisp.

Direct superclasses

error.

Direct slots
Slot: path
Initargs

:path

Condition: fetch-error
Package

nfiles.

Source

conditions.lisp.

Direct superclasses

error.

Direct slots
Slot: url
Initargs

:url

Slot: message
Initargs

:message

Condition: invalid-checksum
Package

nfiles.

Source

conditions.lisp.

Direct superclasses

error.

Direct slots
Slot: path
Initargs

:path

Slot: wanted-checksum
Initargs

:wanted-checksum

Slot: wrong-checksum
Initargs

:wrong-checksum

Condition: process-error
Package

nfiles.

Source

conditions.lisp.

Direct superclasses

subprocess-error.

Direct slots
Slot: message
Initargs

:message


Previous: , Up: Public Interface   [Contents][Index]

4.1.7 Classes

Class: cache-file

Like regular ‘file’ but set directory to ‘uiop:xdg-cache-home’

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

file.

Direct methods

resolve.

Class: config-file

Like regular ‘file’ but set directory to ‘uiop:xdg-config-home’.

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

file.

Direct methods

resolve.

Class: data-file

Like regular ‘file’ but set directory to ‘uiop:xdg-data-home’

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

file.

Direct methods

resolve.

Class: file

The main object to manipulate and subclass.
The ‘profile’ slot can be used to drive the specializations of multiple ‘file’ methods. See ‘resolve’, ‘serialize’, etc.

The ‘name’ slot can be used to refer to ‘file’ objects in a human-readable fashion.

Package

nfiles.

Source

nfiles.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: base-path

The pathname used by the ‘resolve’ method to yield the final path.

Type

pathname

Initform

#p"."

Readers

base-path.

Writers

This slot is read-only.

Slot: profile

The ‘profile’ of the ‘file’.
File expansion is performed against it. The profile is only set at instantiation time.

Type

nfiles:profile

Initform

nfiles:*default-profile*

Initargs

:profile

Readers

profile.

Writers

This slot is read-only.

Slot: name

Name used to identify the object in a human-readable manner.

Type

string

Initform

""

Initargs

:name

Readers

name.

Writers

(setf name).

Slot: read-handler

Function of one argument, the condition that may be raised in the reader thread.

Type

trivial-types:function-designator

Initform

(function identity)

Initargs

:read-handler

Readers

read-handler.

Writers

(setf read-handler).

Slot: write-handler

Function of one argument, the condition that may be raised in the writer thread.

Type

trivial-types:function-designator

Initform

(function identity)

Initargs

:write-handler

Readers

write-handler.

Writers

(setf write-handler).

Slot: on-external-modification

Whether to reload or overwrite the file if it was modified since it was last loaded.

Type

(member nfiles:ask nfiles:reload nfiles:overwrite)

Initform

(quote nfiles:ask)

Initargs

:on-external-modification

Readers

on-external-modification.

Writers

(setf on-external-modification).

Slot: on-deserialization-error

What to do on deserialization error.
The offending file may be backed up with the ‘backup’ function.
Or it may simply be ‘delete’d.
‘ask’ leaves the condition unhandled, so unless you handle it, it will prompt the debugger with the other options.

Type

(member nfiles:ask nfiles:backup delete)

Initform

(quote nfiles:ask)

Initargs

:on-deserialization-error

Readers

on-deserialization-error.

Writers

(setf on-deserialization-error).

Slot: on-read-error

What to do on file read error.
See ‘on-deserialization-error’ for the meaning of the different actions.

Type

(member nfiles:ask nfiles:backup delete)

Initform

(quote nfiles:ask)

Initargs

:on-read-error

Readers

on-read-error.

Writers

(setf on-read-error).

Class: gpg-file

If the resolved path has the GPG type (extension), the file is automatically encrypted and decrypted using the specified recipient key.

See ‘nfiles/gpg:*gpg-default-recipient*’.

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

file.

Direct subclasses

gpg-lisp-file.

Direct methods
Class: gpg-key
Package

nfiles/gpg.

Source

gpg.lisp.

Direct methods
Direct slots
Slot: key-length
Initargs

:key-length

Readers

key-length.

Writers

(setf key-length).

Slot: algorithm
Initargs

:algorithm

Readers

algorithm.

Writers

(setf algorithm).

Slot: key-id
Initargs

:key-id

Readers

key-id.

Writers

(setf key-id).

Slot: creation-date

Stored as in Unix format.

Initargs

:creation-date

Readers

creation-date.

Writers

(setf creation-date).

Slot: expiry-date

Stored as in Unix format.

Initargs

:expiry-date

Readers

expiry-date.

Writers

(setf expiry-date).

Slot: uids
Initargs

:uids

Readers

uids.

Writers

(setf uids).

Slot: fingerprint
Initargs

:fingerprint

Readers

fingerprint.

Writers

(setf fingerprint).

Slot: keygrip
Initargs

:keygrip

Readers

keygrip.

Writers

(setf keygrip).

Class: gpg-lisp-file

If the resolved path has the GPG type (extension), the file is automatically encrypted and decrypted using the specified recipient key.

The ’.lisp’ extension is automatically added if missing.

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses
Direct methods

resolve.

Class: gpg-uid
Package

nfiles/gpg.

Source

gpg.lisp.

Direct methods
Direct slots
Slot: validity
Initargs

:validity

Readers

validity.

Writers

(setf validity).

Slot: user-id
Initargs

:user-id

Readers

user-id.

Writers

(setf user-id).

Class: lisp-file

Like regular ‘file’ but assume a ‘.lisp’ extension, even if not provided.

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

file.

Direct subclasses

gpg-lisp-file.

Direct methods
Class: profile

This is the default profile.
Subclass this profile to make your own, possibly carrying more data.

‘file’ path expansion is specialized against its ‘profile’ slot through the ‘resolve’ method.

Package

nfiles.

Source

nfiles.lisp.

Direct subclasses

read-only-profile.

Direct methods
Direct slots
Slot: name

The name of the profile to refer it with.

Type

string

Initform

"default"

Initargs

:name

Readers

name.

Writers

(setf name).

Class: read-only-file

File that’s not written to on change.
Note that the file’s ‘content’ can still be modified in-memory.

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

file.

Direct subclasses

virtual-file.

Direct methods
Class: read-only-profile

In this profile, files by default don’t get written to.

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

profile.

Direct subclasses

virtual-profile.

Direct methods
Class: remote-file

File which can be found on a remote system or online.

If the local file is not found, then an attempt is made at downloading the file using ‘fetch’.

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

file.

Direct methods
Direct slots
Slot: url

URL from where to download the file.
If empty, then this behaves just like a regular ‘file’.

Type

quri.uri:uri

Initform

(quri.uri:uri "")

Initargs

:url

Readers

url.

Writers

(setf url).

Slot: url-content

The content of the downloaded file.
This is useful if you want to maintain both the raw content and the deserialized content.

Type

string

Initform

""

Initargs

:url-content

Readers

url-content.

Writers

(setf url-content).

Slot: last-update

Last time the file was downloaded.

Type

unsigned-byte

Initform

(get-universal-time)

Initargs

:last-update

Readers

last-update.

Writers

This slot is read-only.

Slot: update-interval

Re-download the file after this amount of seconds has elapsed since last update.
If 0, disable automatic re-download.

Type

unsigned-byte

Initform

0

Initargs

:update-interval

Readers

update-interval.

Writers

(setf update-interval).

Slot: checksum

If non-empty, the ‘check’ method is called on download against the resulting data. If it does not match the ‘checksum’, raise an error.
This probably only makes sense for immutable data, thus ‘update-interval’ ought to be 0.

Type

string

Initform

""

Initargs

:checksum

Readers

checksum.

Writers

(setf checksum).

Slot: on-invalid-checksum

What to do when the downloaded content does not match ‘checksum’.

Type

(member nfiles:ask nfiles:ignore-checksum nfiles:discard)

Initform

(quote nfiles:ask)

Initargs

:on-invalid-checksum

Readers

on-invalid-checksum.

Writers

(setf on-invalid-checksum).

Slot: on-fetch-error

What to do when the file download failed.

Type

(member nfiles:ask)

Initform

(quote nfiles:ask)

Initargs

:on-fetch-error

Readers

on-fetch-error.

Writers

(setf on-fetch-error).

Class: runtime-file

Like regular ‘file’ but set directory to ‘uiop:xdg-runtime-dir’

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

file.

Direct methods

resolve.

Class: virtual-file

File that’s not read nor written to. It’s meant to handle data
in-memory.

Note that if multiple ‘virtual-file’s expand to the same path, they share the same content.

To disable content-sharing for a specific ‘file’, their ‘resolve’ method should return ‘uiop:*nil-pathname*’.

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

read-only-file.

Direct methods
Class: virtual-profile

In this profile, files are neither read nor written to by default.

Package

nfiles.

Source

nfiles.lisp.

Direct superclasses

read-only-profile.

Direct methods

4.2 Internals


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

4.2.1 Constants

Constant: +permissions+
Package

nfiles/pathname.

Source

pathname-helpers.lisp.


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

4.2.2 Special variables

Special Variable: *cache*

Internal ‘*cache*’ associating expanded paths with a dedicated ‘cache-entry’.

Package

nfiles.

Source

nfiles.lisp.

Special Variable: *cache-entry-override*

Implementation detail.
This is used by ‘remote-file’ to write content to disk when the ‘cache-entry’ is initialized, without looping indefinitely.

Package

nfiles.

Source

nfiles.lisp.

Special Variable: *content-override*

Implementation detail.
This is used by ‘remote-file’ to write content to disk when the ‘cache-entry’ is initialized, without looping indefinitely.

Package

nfiles.

Source

nfiles.lisp.

Special Variable: *index*

Set of all ‘file’ objects.
It’s a weak hash table so that garbage-collected files are automatically removed.

Package

nfiles.

Source

nfiles.lisp.

Special Variable: *timeout*

Time in seconds to wait for other write requests.

Package

nfiles.

Source

nfiles.lisp.


4.2.3 Macros

Macro: run-thread (name handler &body body)
Package

nfiles.

Source

nfiles.lisp.


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

4.2.4 Ordinary functions

Function: auto-restarter (restart)

Call RESTART if valid.

Package

nfiles.

Source

nfiles.lisp.

Function: cache-entry (file &optional force-read force-update skip-update)

Files that expand to ‘uiop:*nil-pathname*’ have their own cache entry.

Package

nfiles.

Source

nfiles.lisp.

Function: cache-entry-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: cache-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: call-with-gpg-file (gpg-file options fun)

Like ‘call-with-open-file’ but use ‘gpg’ to read and write to file. OPTIONS are as for ‘open”s ‘:direction’.
Other options are not supported. File is overwritten if it exists, while nothing is done if file is missing.

Package

nfiles/gpg.

Source

gpg.lisp.

Function: clear-cache ()
Package

nfiles.

Source

nfiles.lisp.

Function: config-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: data-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: drain-semaphore (semaphore &optional timeout)

Decrement the semaphore counter down to 0.
Return the number of decrements, or NIL if there was none.

Package

nfiles.

Source

nfiles.lisp.

Function: expand-user-home (string)
Package

nfiles.

Source

nfiles.lisp.

Function: file-key (file)
Package

nfiles.

Source

nfiles.lisp.

Function: filep (object)
Package

nfiles.

Source

nfiles.lisp.

Function: gpg-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: gpg-key-p (object)
Package

nfiles/gpg.

Source

gpg.lisp.

Function: gpg-lisp-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: gpg-path-p (file)
Package

nfiles.

Source

nfiles.lisp.

Function: gpg-recipient (file)

Return the key of FILE’s recipient if any, ‘*gpg-default-recipient*’ otherwise. As second value the email.
As third value the name.

Package

nfiles/gpg.

Source

gpg.lisp.

Function: gpg-uid-p (object)
Package

nfiles/gpg.

Source

gpg.lisp.

Function: gpg-write (stream gpg-file &optional recipient)

Write STREAM to GPG-FILE using RECIPIENT key. If RECIPIENT is not provided, use default key.

Package

nfiles/gpg.

Source

gpg.lisp.

Function: lisp-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: maybe-xdg (xdg-fun path)
Package

nfiles.

Source

nfiles.lisp.

Function: parse-gpg-secret-keys-output (output-string)

Return the list of sections as a list of strings.

Package

nfiles/gpg.

Source

gpg.lisp.

Function: profilep (object)
Package

nfiles.

Source

nfiles.lisp.

Function: read-new-value (prompt)

PROMPT takes no trailing colon nor trailing space.

Package

nfiles/gpg.

Source

gpg.lisp.

Function: read-only-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: read-only-profile-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: remote-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: run-program* (command &key input)

Like ‘uiop:run-program’ but raise a ‘nfiles:process-error’ on error.

Package

nfiles/gpg.

Source

gpg.lisp.

Function: runtime-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: special-pathname-namestring-p (pathname-namestring)

Return non-nil if pathname is special like "." or "..". Note that this returns nil on #p"." and #p"..".

Package

nfiles/pathname.

Source

pathname-helpers.lisp.

Function: updatable-p (file)
Package

nfiles.

Source

nfiles.lisp.

Function: url-empty-p (url)

Small convenience function to check whether the given URL is empty.

Package

nfiles.

Source

nfiles.lisp.

Function: virtual-file-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: virtual-profile-p (object)
Package

nfiles.

Source

nfiles.lisp.

Function: worker-write (file cache-entry)
Package

nfiles.

Source

nfiles.lisp.

Function: write-cache-entry (file entry)
Package

nfiles.

Source

nfiles.lisp.


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

4.2.5 Generic functions

Generic Reader: cached-value (object)
Package

nfiles.

Methods
Reader Method: cached-value ((cache-entry cache-entry))

automatically generated reader method

Source

nfiles.lisp.

Target Slot

cached-value.

Generic Writer: (setf cached-value) (object)
Package

nfiles.

Methods
Writer Method: (setf cached-value) ((cache-entry cache-entry))

automatically generated writer method

Source

nfiles.lisp.

Target Slot

cached-value.

Generic Reader: last-update (object)
Generic Writer: (setf last-update) (object)
Package

nfiles.

Methods
Reader Method: last-update ((cache-entry cache-entry))
Writer Method: (setf last-update) ((cache-entry cache-entry))

The date at which the cache entry was last updated.

Source

nfiles.lisp.

Target Slot

last-update.

Reader Method: last-update ((remote-file remote-file))

Last time the file was downloaded.

Source

nfiles.lisp.

Target Slot

last-update.

Generic Reader: source-file (object)
Generic Writer: (setf source-file) (object)
Package

nfiles.

Methods
Reader Method: source-file ((cache-entry cache-entry))
Writer Method: (setf source-file) ((cache-entry cache-entry))

This is the ‘file’ object that was used to instantiate the entry’s ‘cached-value’.

Source

nfiles.lisp.

Target Slot

source-file.

Generic Reader: worker (object)
Package

nfiles.

Methods
Reader Method: worker ((cache-entry cache-entry))

automatically generated reader method

Source

nfiles.lisp.

Target Slot

worker.

Generic Writer: (setf worker) (object)
Package

nfiles.

Methods
Writer Method: (setf worker) ((cache-entry cache-entry))

automatically generated writer method

Source

nfiles.lisp.

Target Slot

worker.

Generic Reader: worker-notifier (object)
Package

nfiles.

Methods
Reader Method: worker-notifier ((cache-entry cache-entry))

automatically generated reader method

Source

nfiles.lisp.

Target Slot

worker-notifier.

Generic Writer: (setf worker-notifier) (object)
Package

nfiles.

Methods
Writer Method: (setf worker-notifier) ((cache-entry cache-entry))

automatically generated writer method

Source

nfiles.lisp.

Target Slot

worker-notifier.


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

4.2.6 Conditions

Condition: read-error

This condition is used internally to cancel a file read.

Package

nfiles.

Source

conditions.lisp.

Direct superclasses

error.


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

4.2.7 Classes

Class: cache-entry
Package

nfiles.

Source

nfiles.lisp.

Direct methods
Direct slots
Slot: source-file

This is the ‘file’ object that was used to instantiate the entry’s ‘cached-value’.

Type

nfiles:file

Initform

(error "source file must be given.")

Initargs

:source-file

Readers

source-file.

Writers

(setf source-file).

Slot: last-update

The date at which the cache entry was last updated.

Type

unsigned-byte

Initform

(get-universal-time)

Initargs

:last-update

Readers

last-update.

Writers

(setf last-update).

Slot: cached-value
Initargs

:cached-value

Readers

cached-value.

Writers

(setf cached-value).

Slot: worker
Type

(or null bordeaux-threads:thread)

Initargs

:worker

Readers

worker.

Writers

(setf worker).

Slot: worker-notifier
Type

(or null bordeaux-threads:semaphore)

Initargs

:worker-notifier

Readers

worker-notifier.

Writers

(setf worker-notifier).


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   I   J   K   L   M   N   O   P   R   S   U   V   W  
Index Entry  Section

(
(setf algorithm): Public generic functions
(setf algorithm): Public generic functions
(setf cached-value): Private generic functions
(setf cached-value): Private generic functions
(setf checksum): Public generic functions
(setf checksum): Public generic functions
(setf content): Public ordinary functions
(setf creation-date): Public generic functions
(setf creation-date): Public generic functions
(setf expiry-date): Public generic functions
(setf expiry-date): Public generic functions
(setf file-group): Public ordinary functions
(setf file-user): Public ordinary functions
(setf fingerprint): Public generic functions
(setf fingerprint): Public generic functions
(setf key-id): Public generic functions
(setf key-id): Public generic functions
(setf key-length): Public generic functions
(setf key-length): Public generic functions
(setf keygrip): Public generic functions
(setf keygrip): Public generic functions
(setf last-update): Private generic functions
(setf last-update): Private generic functions
(setf name): Public generic functions
(setf name): Public generic functions
(setf name): Public generic functions
(setf on-deserialization-error): Public generic functions
(setf on-deserialization-error): Public generic functions
(setf on-external-modification): Public generic functions
(setf on-external-modification): Public generic functions
(setf on-fetch-error): Public generic functions
(setf on-fetch-error): Public generic functions
(setf on-invalid-checksum): Public generic functions
(setf on-invalid-checksum): Public generic functions
(setf on-read-error): Public generic functions
(setf on-read-error): Public generic functions
(setf permissions): Public ordinary functions
(setf read-handler): Public generic functions
(setf read-handler): Public generic functions
(setf source-file): Private generic functions
(setf source-file): Private generic functions
(setf uids): Public generic functions
(setf uids): Public generic functions
(setf update-interval): Public generic functions
(setf update-interval): Public generic functions
(setf url): Public generic functions
(setf url): Public generic functions
(setf url-content): Public generic functions
(setf url-content): Public generic functions
(setf user-id): Public generic functions
(setf user-id): Public generic functions
(setf validity): Public generic functions
(setf validity): Public generic functions
(setf worker): Private generic functions
(setf worker): Private generic functions
(setf worker-notifier): Private generic functions
(setf worker-notifier): Private generic functions
(setf write-handler): Public generic functions
(setf write-handler): Public generic functions

A
algorithm: Public generic functions
algorithm: Public generic functions
all-files: Public ordinary functions
auto-restarter: Private ordinary functions

B
backup: Public ordinary functions
base-path: Public generic functions
base-path: Public generic functions
basename: Public ordinary functions

C
cache-entry: Private ordinary functions
cache-entry-p: Private ordinary functions
cache-file-p: Private ordinary functions
cached-value: Private generic functions
cached-value: Private generic functions
call-with-gpg-file: Private ordinary functions
check: Public generic functions
check: Public generic functions
checksum: Public generic functions
checksum: Public generic functions
clear-cache: Private ordinary functions
config-file-p: Private ordinary functions
content: Public ordinary functions
creation-date: Public generic functions
creation-date: Public generic functions

D
data-file-p: Private ordinary functions
deserialize: Public generic functions
deserialize: Public generic functions
deserialize: Public generic functions
deserialize: Public generic functions
deserialize: Public generic functions
deserialize: Public generic functions
directory-pathname-p: Public ordinary functions
drain-semaphore: Private ordinary functions

E
ensure-type: Public ordinary functions
exists-p: Public ordinary functions
expand: Public ordinary functions
expand-user-home: Private ordinary functions
expiry-date: Public generic functions
expiry-date: Public generic functions

F
fetch: Public generic functions
file-group: Public ordinary functions
file-key: Private ordinary functions
file-user: Public ordinary functions
filep: Private ordinary functions
fingerprint: Public generic functions
fingerprint: Public generic functions
Function, (setf content): Public ordinary functions
Function, (setf file-group): Public ordinary functions
Function, (setf file-user): Public ordinary functions
Function, (setf permissions): Public ordinary functions
Function, all-files: Public ordinary functions
Function, auto-restarter: Private ordinary functions
Function, backup: Public ordinary functions
Function, basename: Public ordinary functions
Function, cache-entry: Private ordinary functions
Function, cache-entry-p: Private ordinary functions
Function, cache-file-p: Private ordinary functions
Function, call-with-gpg-file: Private ordinary functions
Function, clear-cache: Private ordinary functions
Function, config-file-p: Private ordinary functions
Function, content: Public ordinary functions
Function, data-file-p: Private ordinary functions
Function, directory-pathname-p: Public ordinary functions
Function, drain-semaphore: Private ordinary functions
Function, ensure-type: Public ordinary functions
Function, exists-p: Public ordinary functions
Function, expand: Public ordinary functions
Function, expand-user-home: Private ordinary functions
Function, file-group: Public ordinary functions
Function, file-key: Private ordinary functions
Function, file-user: Public ordinary functions
Function, filep: Private ordinary functions
Function, gpg-file-p: Private ordinary functions
Function, gpg-key-p: Private ordinary functions
Function, gpg-lisp-file-p: Private ordinary functions
Function, gpg-path-p: Private ordinary functions
Function, gpg-private-keys: Public ordinary functions
Function, gpg-recipient: Private ordinary functions
Function, gpg-uid-p: Private ordinary functions
Function, gpg-write: Private ordinary functions
Function, join: Public ordinary functions
Function, lisp-file-p: Private ordinary functions
Function, maybe-xdg: Private ordinary functions
Function, nil-pathname-p: Public ordinary functions
Function, parent: Public ordinary functions
Function, parse-gpg-secret-keys-output: Private ordinary functions
Function, pathname-type*: Public ordinary functions
Function, permissions: Public ordinary functions
Function, profilep: Private ordinary functions
Function, read-new-value: Private ordinary functions
Function, read-only-file-p: Private ordinary functions
Function, read-only-profile-p: Private ordinary functions
Function, remote-file-p: Private ordinary functions
Function, run-program*: Private ordinary functions
Function, runtime-file-p: Private ordinary functions
Function, special-pathname-namestring-p: Private ordinary functions
Function, updatable-p: Private ordinary functions
Function, url-empty-p: Private ordinary functions
Function, virtual-file-p: Private ordinary functions
Function, virtual-profile-p: Private ordinary functions
Function, worker-write: Private ordinary functions
Function, write-cache-entry: Private ordinary functions

G
Generic Function, (setf algorithm): Public generic functions
Generic Function, (setf cached-value): Private generic functions
Generic Function, (setf checksum): Public generic functions
Generic Function, (setf creation-date): Public generic functions
Generic Function, (setf expiry-date): Public generic functions
Generic Function, (setf fingerprint): Public generic functions
Generic Function, (setf key-id): Public generic functions
Generic Function, (setf key-length): Public generic functions
Generic Function, (setf keygrip): Public generic functions
Generic Function, (setf last-update): Private generic functions
Generic Function, (setf name): Public generic functions
Generic Function, (setf on-deserialization-error): Public generic functions
Generic Function, (setf on-external-modification): Public generic functions
Generic Function, (setf on-fetch-error): Public generic functions
Generic Function, (setf on-invalid-checksum): Public generic functions
Generic Function, (setf on-read-error): Public generic functions
Generic Function, (setf read-handler): Public generic functions
Generic Function, (setf source-file): Private generic functions
Generic Function, (setf uids): Public generic functions
Generic Function, (setf update-interval): Public generic functions
Generic Function, (setf url): Public generic functions
Generic Function, (setf url-content): Public generic functions
Generic Function, (setf user-id): Public generic functions
Generic Function, (setf validity): Public generic functions
Generic Function, (setf worker): Private generic functions
Generic Function, (setf worker-notifier): Private generic functions
Generic Function, (setf write-handler): Public generic functions
Generic Function, algorithm: Public generic functions
Generic Function, base-path: Public generic functions
Generic Function, cached-value: Private generic functions
Generic Function, check: Public generic functions
Generic Function, checksum: Public generic functions
Generic Function, creation-date: Public generic functions
Generic Function, deserialize: Public generic functions
Generic Function, expiry-date: Public generic functions
Generic Function, fetch: Public generic functions
Generic Function, fingerprint: Public generic functions
Generic Function, key-id: Public generic functions
Generic Function, key-length: Public generic functions
Generic Function, keygrip: Public generic functions
Generic Function, last-update: Private generic functions
Generic Function, name: Public generic functions
Generic Function, on-deserialization-error: Public generic functions
Generic Function, on-external-modification: Public generic functions
Generic Function, on-fetch-error: Public generic functions
Generic Function, on-invalid-checksum: Public generic functions
Generic Function, on-read-error: Public generic functions
Generic Function, profile: Public generic functions
Generic Function, read-file: Public generic functions
Generic Function, read-handler: Public generic functions
Generic Function, resolve: Public generic functions
Generic Function, serialize: Public generic functions
Generic Function, source-file: Private generic functions
Generic Function, uids: Public generic functions
Generic Function, update-interval: Public generic functions
Generic Function, url: Public generic functions
Generic Function, url-content: Public generic functions
Generic Function, user-id: Public generic functions
Generic Function, validity: Public generic functions
Generic Function, worker: Private generic functions
Generic Function, worker-notifier: Private generic functions
Generic Function, write-file: Public generic functions
Generic Function, write-handler: Public generic functions
gpg-file-p: Private ordinary functions
gpg-key-p: Private ordinary functions
gpg-lisp-file-p: Private ordinary functions
gpg-path-p: Private ordinary functions
gpg-private-keys: Public ordinary functions
gpg-recipient: Private ordinary functions
gpg-uid-p: Private ordinary functions
gpg-write: Private ordinary functions

I
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods

J
join: Public ordinary functions

K
key-id: Public generic functions
key-id: Public generic functions
key-length: Public generic functions
key-length: Public generic functions
keygrip: Public generic functions
keygrip: Public generic functions

L
last-update: Private generic functions
last-update: Private generic functions
last-update: Private generic functions
lisp-file-p: Private ordinary functions

M
Macro, run-thread: Private macros
Macro, with-file-content: Public macros
Macro, with-gpg-file: Public macros
Macro, with-paths: Public macros
maybe-xdg: Private ordinary functions
Method, (setf algorithm): Public generic functions
Method, (setf cached-value): Private generic functions
Method, (setf checksum): Public generic functions
Method, (setf creation-date): Public generic functions
Method, (setf expiry-date): Public generic functions
Method, (setf fingerprint): Public generic functions
Method, (setf key-id): Public generic functions
Method, (setf key-length): Public generic functions
Method, (setf keygrip): Public generic functions
Method, (setf last-update): Private generic functions
Method, (setf name): Public generic functions
Method, (setf name): Public generic functions
Method, (setf on-deserialization-error): Public generic functions
Method, (setf on-external-modification): Public generic functions
Method, (setf on-fetch-error): Public generic functions
Method, (setf on-invalid-checksum): Public generic functions
Method, (setf on-read-error): Public generic functions
Method, (setf read-handler): Public generic functions
Method, (setf source-file): Private generic functions
Method, (setf uids): Public generic functions
Method, (setf update-interval): Public generic functions
Method, (setf url): Public generic functions
Method, (setf url-content): Public generic functions
Method, (setf user-id): Public generic functions
Method, (setf validity): Public generic functions
Method, (setf worker): Private generic functions
Method, (setf worker-notifier): Private generic functions
Method, (setf write-handler): Public generic functions
Method, algorithm: Public generic functions
Method, base-path: Public generic functions
Method, cached-value: Private generic functions
Method, check: Public generic functions
Method, checksum: Public generic functions
Method, creation-date: Public generic functions
Method, deserialize: Public generic functions
Method, deserialize: Public generic functions
Method, deserialize: Public generic functions
Method, deserialize: Public generic functions
Method, deserialize: Public generic functions
Method, expiry-date: Public generic functions
Method, fingerprint: Public generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, key-id: Public generic functions
Method, key-length: Public generic functions
Method, keygrip: Public generic functions
Method, last-update: Private generic functions
Method, last-update: Private generic functions
Method, name: Public generic functions
Method, name: Public generic functions
Method, on-deserialization-error: Public generic functions
Method, on-external-modification: Public generic functions
Method, on-fetch-error: Public generic functions
Method, on-invalid-checksum: Public generic functions
Method, on-read-error: Public generic functions
Method, profile: Public generic functions
Method, read-file: Public generic functions
Method, read-file: Public generic functions
Method, read-file: Public generic functions
Method, read-file: Public generic functions
Method, read-file: Public generic functions
Method, read-file: Public generic functions
Method, read-handler: Public generic functions
Method, resolve: Public generic functions
Method, resolve: Public generic functions
Method, resolve: Public generic functions
Method, resolve: Public generic functions
Method, resolve: Public generic functions
Method, resolve: Public generic functions
Method, resolve: Public generic functions
Method, resolve: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, serialize: Public generic functions
Method, source-file: Private generic functions
Method, uids: Public generic functions
Method, update-interval: Public generic functions
Method, url: Public generic functions
Method, url-content: Public generic functions
Method, user-id: Public generic functions
Method, validity: Public generic functions
Method, worker: Private generic functions
Method, worker-notifier: Private generic functions
Method, write-file: Public generic functions
Method, write-file: Public generic functions
Method, write-file: Public generic functions
Method, write-file: Public generic functions
Method, write-file: Public generic functions
Method, write-handler: Public generic functions

N
name: Public generic functions
name: Public generic functions
name: Public generic functions
nil-pathname-p: Public ordinary functions

O
on-deserialization-error: Public generic functions
on-deserialization-error: Public generic functions
on-external-modification: Public generic functions
on-external-modification: Public generic functions
on-fetch-error: Public generic functions
on-fetch-error: Public generic functions
on-invalid-checksum: Public generic functions
on-invalid-checksum: Public generic functions
on-read-error: Public generic functions
on-read-error: Public generic functions

P
parent: Public ordinary functions
parse-gpg-secret-keys-output: Private ordinary functions
pathname-type*: Public ordinary functions
permissions: Public ordinary functions
profile: Public generic functions
profile: Public generic functions
profilep: Private ordinary functions

R
read-file: Public generic functions
read-file: Public generic functions
read-file: Public generic functions
read-file: Public generic functions
read-file: Public generic functions
read-file: Public generic functions
read-file: Public generic functions
read-handler: Public generic functions
read-handler: Public generic functions
read-new-value: Private ordinary functions
read-only-file-p: Private ordinary functions
read-only-profile-p: Private ordinary functions
remote-file-p: Private ordinary functions
resolve: Public generic functions
resolve: Public generic functions
resolve: Public generic functions
resolve: Public generic functions
resolve: Public generic functions
resolve: Public generic functions
resolve: Public generic functions
resolve: Public generic functions
resolve: Public generic functions
run-program*: Private ordinary functions
run-thread: Private macros
runtime-file-p: Private ordinary functions

S
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
serialize: Public generic functions
source-file: Private generic functions
source-file: Private generic functions
special-pathname-namestring-p: Private ordinary functions

U
uids: Public generic functions
uids: Public generic functions
updatable-p: Private ordinary functions
update-interval: Public generic functions
update-interval: Public generic functions
url: Public generic functions
url: Public generic functions
url-content: Public generic functions
url-content: Public generic functions
url-empty-p: Private ordinary functions
user-id: Public generic functions
user-id: Public generic functions

V
validity: Public generic functions
validity: Public generic functions
virtual-file-p: Private ordinary functions
virtual-profile-p: Private ordinary functions

W
with-file-content: Public macros
with-gpg-file: Public macros
with-paths: Public macros
worker: Private generic functions
worker: Private generic functions
worker-notifier: Private generic functions
worker-notifier: Private generic functions
worker-write: Private ordinary functions
write-cache-entry: Private ordinary functions
write-file: Public generic functions
write-file: Public generic functions
write-file: Public generic functions
write-file: Public generic functions
write-file: Public generic functions
write-file: Public generic functions
write-handler: Public generic functions
write-handler: Public generic functions

Jump to:   (  
A   B   C   D   E   F   G   I   J   K   L   M   N   O   P   R   S   U   V   W  

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

A.3 Variables

Jump to:   *   +  
A   B   C   E   F   K   L   M   N   O   P   R   S   U   V   W  
Index Entry  Section

*
*cache*: Private special variables
*cache-entry-override*: Private special variables
*content-override*: Private special variables
*default-profile*: Public special variables
*gpg-default-recipient*: Public special variables
*gpg-program*: Public special variables
*index*: Private special variables
*timeout*: Private special variables

+
+permissions+: Private constants

A
algorithm: Public classes

B
base-path: Public classes

C
cached-value: Private classes
checksum: Public classes
Constant, +permissions+: Private constants
creation-date: Public classes

E
expiry-date: Public classes

F
fingerprint: Public classes

K
key-id: Public classes
key-length: Public classes
keygrip: Public classes

L
last-update: Public classes
last-update: Private classes

M
message: Public conditions
message: Public conditions

N
name: Public classes
name: Public classes

O
on-deserialization-error: Public classes
on-external-modification: Public classes
on-fetch-error: Public classes
on-invalid-checksum: Public classes
on-read-error: Public classes

P
path: Public conditions
path: Public conditions
profile: Public classes

R
read-handler: Public classes

S
Slot, algorithm: Public classes
Slot, base-path: Public classes
Slot, cached-value: Private classes
Slot, checksum: Public classes
Slot, creation-date: Public classes
Slot, expiry-date: Public classes
Slot, fingerprint: Public classes
Slot, key-id: Public classes
Slot, key-length: Public classes
Slot, keygrip: Public classes
Slot, last-update: Public classes
Slot, last-update: Private classes
Slot, message: Public conditions
Slot, message: Public conditions
Slot, name: Public classes
Slot, name: Public classes
Slot, on-deserialization-error: Public classes
Slot, on-external-modification: Public classes
Slot, on-fetch-error: Public classes
Slot, on-invalid-checksum: Public classes
Slot, on-read-error: Public classes
Slot, path: Public conditions
Slot, path: Public conditions
Slot, profile: Public classes
Slot, read-handler: Public classes
Slot, source-file: Private classes
Slot, uids: Public classes
Slot, update-interval: Public classes
Slot, url: Public conditions
Slot, url: Public classes
Slot, url-content: Public classes
Slot, user-id: Public classes
Slot, validity: Public classes
Slot, wanted-checksum: Public conditions
Slot, worker: Private classes
Slot, worker-notifier: Private classes
Slot, write-handler: Public classes
Slot, wrong-checksum: Public conditions
source-file: Private classes
Special Variable, *cache*: Private special variables
Special Variable, *cache-entry-override*: Private special variables
Special Variable, *content-override*: Private special variables
Special Variable, *default-profile*: Public special variables
Special Variable, *gpg-default-recipient*: Public special variables
Special Variable, *gpg-program*: Public special variables
Special Variable, *index*: Private special variables
Special Variable, *timeout*: Private special variables

U
uids: Public classes
update-interval: Public classes
url: Public conditions
url: Public classes
url-content: Public classes
user-id: Public classes

V
validity: Public classes

W
wanted-checksum: Public conditions
worker: Private classes
worker-notifier: Private classes
write-handler: Public classes
wrong-checksum: Public conditions

Jump to:   *   +  
A   B   C   E   F   K   L   M   N   O   P   R   S   U   V   W  

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

A.4 Data types

Jump to:   C   D   E   F   G   I   L   N   P   R   S   V  
Index Entry  Section

C
cache-entry: Private classes
cache-file: Public classes
Class, cache-entry: Private classes
Class, cache-file: Public classes
Class, config-file: Public classes
Class, data-file: Public classes
Class, file: Public classes
Class, gpg-file: Public classes
Class, gpg-key: Public classes
Class, gpg-lisp-file: Public classes
Class, gpg-uid: Public classes
Class, lisp-file: Public classes
Class, profile: Public classes
Class, read-only-file: Public classes
Class, read-only-profile: Public classes
Class, remote-file: Public classes
Class, runtime-file: Public classes
Class, virtual-file: Public classes
Class, virtual-profile: Public classes
Condition, external-modification: Public conditions
Condition, fetch-error: Public conditions
Condition, invalid-checksum: Public conditions
Condition, process-error: Public conditions
Condition, read-error: Private conditions
conditions.lisp: The nfiles/conditions․lisp file
config-file: Public classes

D
data-file: Public classes

E
external-modification: Public conditions

F
fetch-error: Public conditions
file: Public classes
File, conditions.lisp: The nfiles/conditions․lisp file
File, gpg.lisp: The nfiles/gpg․lisp file
File, nfiles.asd: The nfiles/nfiles․asd file
File, nfiles.lisp: The nfiles/nfiles․lisp file
File, package.lisp: The nfiles/package․lisp file
File, pathname-helpers.lisp: The nfiles/pathname-helpers․lisp file

G
gpg-file: Public classes
gpg-key: Public classes
gpg-lisp-file: Public classes
gpg-uid: Public classes
gpg.lisp: The nfiles/gpg․lisp file

I
invalid-checksum: Public conditions

L
lisp-file: Public classes

N
nfiles: The nfiles system
nfiles: The nfiles package
nfiles.asd: The nfiles/nfiles․asd file
nfiles.lisp: The nfiles/nfiles․lisp file
nfiles/gpg: The nfiles/gpg package
nfiles/pathname: The nfiles/pathname package

P
Package, nfiles: The nfiles package
Package, nfiles/gpg: The nfiles/gpg package
Package, nfiles/pathname: The nfiles/pathname package
package.lisp: The nfiles/package․lisp file
pathname-helpers.lisp: The nfiles/pathname-helpers․lisp file
process-error: Public conditions
profile: Public classes

R
read-error: Private conditions
read-only-file: Public classes
read-only-profile: Public classes
remote-file: Public classes
runtime-file: Public classes

S
System, nfiles: The nfiles system

V
virtual-file: Public classes
virtual-profile: Public classes

Jump to:   C   D   E   F   G   I   L   N   P   R   S   V