The metafs Reference Manual

Table of Contents

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

The metafs Reference Manual

This is the metafs Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:16:09 2018 GMT+0.


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

1 Systems

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


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

1.1 metafs

Maintainer

Walter C. Pelissero <walter@pelissero.de>

Author

Walter C. Pelissero <walter@pelissero.de>

License

LGPL

Description

Meta-Data File System

Long Description

This is a library that allows the manipulation of files associating metadata information to them.

Dependency

sclf

Source

metafs.asd (file)

Components

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

2 Files

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


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

2.1 Lisp


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

2.1.1 metafs.asd

Location

metafs.asd

Systems

metafs (system)

Packages

metafs-system


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

2.1.2 metafs/metafs.lisp

Parent

metafs (system)

Location

metafs.lisp

Packages

meta-file-system

Exported Definitions
Internal Definitions

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

2.2 Other


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

2.2.1 metafs/Makefile

Parent

metafs (system)

Location

Makefile


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

2.2.2 metafs/test.lisp

Parent

metafs (system)

Location

test.lisp


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

3 Packages

Packages are listed by definition order.


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

3.1 metafs-system

Source

metafs.asd

Use List

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

3.2 meta-file-system

Source

metafs.lisp (file)

Nickname

metafs

Use List
Exported Definitions
Internal Definitions

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

4 Definitions

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


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

4.1 Exported definitions


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

4.1.1 Special variables

Special Variable: *auto-save*

Whether setting a property or changing any metadata will automatically make the change permanent on the filesystem.

Package

meta-file-system

Source

metafs.lisp (file)

Special Variable: *default-file-class*

The class that is instantiated by default for an unknown file type. See FILE-CLASS-BY-PATHNAME and MAKE-FILE-SYSTEM-OBJECT-FROM-FILE.

Package

meta-file-system

Source

metafs.lisp (file)

Special Variable: *metadata-directory-name*

Name of the directory that contains the metadata files.

Package

meta-file-system

Source

metafs.lisp (file)


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

4.1.2 Macros

Macro: define-file-system-object NAME SUPER-CLASSES FILENAME-TYPES &rest CLASS-DECLARATIONS

This is the macro that should be used to declared new classes
derived from FILE-SYSTEM-OBJECT. The syntax is similar to defclass with few differences: if no superclass is mentioned it defaults to FILE-SYSTEM-OBJECT; FILENAME-TYPES is the list of file types this class represents. This list is used by MAKE-FILE-SYSTEM-OBJECT-FROM-FILE to automatically instantiate the right object from a pathname. FILENAME-TYPES is a
list of strings, pathnames, or functions: strings are matched against pathname-type of the files, pathnames are matched against the whole pathname of files, while the function is called passing the pathname
of files. These functions should return true if they recognise the
file as of their type.

Package

meta-file-system

Source

metafs.lisp (file)


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

4.1.3 Functions

Function: metadata-directory-p FILE

Return true if PATHNAME is a metadata directory. This function may be used by programs that search through a directory tree, to be able to skip metadata directories. The DIRECTORY function in this package does already this.

Package

meta-file-system

Source

metafs.lisp (file)


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

4.1.4 Generic functions

Generic Function: copy-file FILE-SYSTEM-OBJECT NEW-PATH &key IF-EXISTS

Copy FILE to NEW-PATH preserving its metadata in the copy. Return a new FILE-SYSTEM-OBJECT object.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: copy-file (FILE pathname) NEW-PATH &key IF-EXISTS
Method: copy-file (FILE file-system-object) NEW-PATH &key IF-EXISTS
Generic Function: delete-file FILE

Like CL:DELETE-FILE but takes care of removing the metadata as well.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: delete-file (DIRECTORY system-directory)
Method: delete-file (FILE system-file)
Method: delete-file (FILE pathname)
Method: delete-file (FILE file-system-object)

This method deletes only the metadata. It’s responsability of the specialisers to delete the FILE itself.

Generic Function: fs-object THING

Return a FILE-SYSTEM-OBJECT object of THING.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: fs-object (THING file-system-object)
Method: fs-object (THING string)
Method: fs-object (THING pathname)
Generic Function: list-directory DIRECTORY

Just like SCLF:LIST-DIRECTORY but this one returns a list of FILE-SYSTEM-OBJECT objects. Care is taken to skip metadata directories and their
contents.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: list-directory THING
Method: list-directory (PATHNAME pathname)
Generic Function: metadata FILE
Generic Function: (setf metadata) VALUE FILE
Package

meta-file-system

Methods
Method: metadata (FILE file-system-object)
Source

metafs.lisp (file)

Method: (setf metadata) VALUE (FILE file-system-object)

Setter method of the metadata slot. Automatically make the new value permanent on disk. Return VALUE.

Source

metafs.lisp (file)

Generic Function: metadata-pathnames FILE

Return the list of pathnames of the metadata files associated with FILE.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: metadata-pathnames (FILE file-system-object)
Generic Function: move-file FILE NEW-PATH &key IF-EXISTS

Like RENAME-FILE but handle cross-filesystem relocations.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: move-file (DIRECTORY system-directory) NEW-PATH &key IF-EXISTS
Method: move-file (FILE pathname) NEW-PATH &key IF-EXISTS
Method: move-file (FILE file-system-object) NEW-PATH &key IF-EXISTS
Generic Function: pathname THING

Return a pathname object from THING.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: pathname THING

Fall back method: use standard CL function.

Method: pathname (FILE-SYSTEM-OBJECT file-system-object)

automatically generated reader method

Generic Function: property FILE KEYWORD
Generic Function: (setf property) VALUE FILE KEYWORD
Package

meta-file-system

Methods
Method: property (FILE file-system-object) KEYWORD

Get a metadata property.

Source

metafs.lisp (file)

Method: (setf property) VALUE (FILE file-system-object) KEYWORD

Set or add a metadata property. Return VALUE.

Source

metafs.lisp (file)

Generic Function: remove-metadata FILE

Permanently remove the metadata from FILE object.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: remove-metadata (FILE file-system-object)
Generic Function: remove-property FILE KEYWORD
Package

meta-file-system

Methods
Method: remove-property (FILE file-system-object) KEYWORD
Source

metafs.lisp (file)

Generic Function: rename-file FILE NEW-PATH

Like CL:RENAME-FILE but polymorphically handle METAFS:FILE-SYSTEM-OBJECTs as well.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: rename-file (FILE pathname) NEW-PATH
Method: rename-file (FILE file-system-object) NEW-PATH
Method: rename-file (FILE file-system-object) NEW-PATH around
Generic Function: save-metadata FILE
Package

meta-file-system

Methods
Method: save-metadata (FILE file-system-object)

Save the metadata of FILE-SYSTEM-OBJECT into its file.

Source

metafs.lisp (file)


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

4.1.5 Classes

Class: file-system-object ()
Package

meta-file-system

Source

metafs.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: pathname
Initargs

:pathname

Readers

pathname (generic function)

Slot: metadata

Alist of keywords and values

Class: system-directory ()

Class that models file system directories.

Package

meta-file-system

Source

metafs.lisp (file)

Direct superclasses

file-system-object (class)

Direct methods
Class: system-file ()

Class that models standard files.

Package

meta-file-system

Source

metafs.lisp (file)

Direct superclasses

file-system-object (class)

Direct methods

delete-file (method)


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

4.2 Internal definitions


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

4.2.1 Special variables

Special Variable: *file-types-table*

Lookup table for the automatic instantiation of file-system-object class objects. This variable is normally updated by the DEFINE-FILE-SYSTEM-OBJECT macro when defining new types derived from FILE-SYSTEM-OBJECT. This is an alist of strings or function and types. See DEFINE-FILE-SYSTEM-OBJECT for further details.

Package

meta-file-system

Source

metafs.lisp (file)


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

4.2.2 Functions

Function: check-metadata-consistency PATHNAME

Remove stray metadata files from directory PATHNAME.

Package

meta-file-system

Source

metafs.lisp (file)

Function: file-class-by-pathname PATHNAME

Given a pathname return the class that best represents the kind of file. By default return *DEFAULT-FILE-CLASS*.

Package

meta-file-system

Source

metafs.lisp (file)

Function: find-metadata SEARCH-PATHS METADATA-MATCHERS
Package

meta-file-system

Source

metafs.lisp (file)

Function: make-file-system-object-from-file PATHNAME
Package

meta-file-system

Source

metafs.lisp (file)

Function: match-property-p FILE KEYWORD MATCH-VALUE
Package

meta-file-system

Source

metafs.lisp (file)

Function: read-metadata PATHNAME

Read the metadata information belonging to PATHNAME file. Return NIL if not available.

Package

meta-file-system

Source

metafs.lisp (file)

Function: remove-empty-metadata-directory FILE

Attempt to remove the metadata directory if empty.

Package

meta-file-system

Source

metafs.lisp (file)


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

4.2.3 Generic functions

Generic Function: delete-metadata-file FILE-SYSTEM-OBJECT

Delete just the file containing the metadata. Don’t do anything if metadata file doesn’t exist. Return true if the metadata file was deleted otherwise false.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: delete-metadata-file (FILE pathname)
Method: delete-metadata-file (FILE file-system-object)
Generic Function: load-metadata FILE
Package

meta-file-system

Methods
Method: load-metadata (FILE file-system-object)

Load the metadata of FILE-SYSTEM-OBJECT from its file.

Source

metafs.lisp (file)

Generic Function: metadata-directory FILE

Return the pathname of the directory containing the metadata for FILE.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: metadata-directory (FILE file-system-object)
Method: metadata-directory (FILE pathname)
Generic Function: metadata-pathname FILE

Return the pathname of the metadata file associated with FILE.

Package

meta-file-system

Source

metafs.lisp (file)

Methods
Method: metadata-pathname (FILE file-system-object)
Method: metadata-pathname (FILE pathname)

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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   M   O  
Index Entry  Section

F
File, Lisp, metafs.asd: The metafs<dot>asd file
File, Lisp, metafs/metafs.lisp: The metafs/metafs<dot>lisp file
File, other, metafs/Makefile: The metafs/makefile file
File, other, metafs/test.lisp: The metafs/test<dot>lisp file

L
Lisp File, metafs.asd: The metafs<dot>asd file
Lisp File, metafs/metafs.lisp: The metafs/metafs<dot>lisp file

M
metafs.asd: The metafs<dot>asd file
metafs/Makefile: The metafs/makefile file
metafs/metafs.lisp: The metafs/metafs<dot>lisp file
metafs/test.lisp: The metafs/test<dot>lisp file

O
Other File, metafs/Makefile: The metafs/makefile file
Other File, metafs/test.lisp: The metafs/test<dot>lisp file

Jump to:   F   L   M   O  

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

A.2 Functions

Jump to:   (  
C   D   F   G   L   M   P   R   S  
Index Entry  Section

(
(setf metadata): Exported generic functions
(setf metadata): Exported generic functions
(setf property): Exported generic functions
(setf property): Exported generic functions

C
check-metadata-consistency: Internal functions
copy-file: Exported generic functions
copy-file: Exported generic functions
copy-file: Exported generic functions

D
define-file-system-object: Exported macros
delete-file: Exported generic functions
delete-file: Exported generic functions
delete-file: Exported generic functions
delete-file: Exported generic functions
delete-file: Exported generic functions
delete-metadata-file: Internal generic functions
delete-metadata-file: Internal generic functions
delete-metadata-file: Internal generic functions

F
file-class-by-pathname: Internal functions
find-metadata: Internal functions
fs-object: Exported generic functions
fs-object: Exported generic functions
fs-object: Exported generic functions
fs-object: Exported generic functions
Function, check-metadata-consistency: Internal functions
Function, file-class-by-pathname: Internal functions
Function, find-metadata: Internal functions
Function, make-file-system-object-from-file: Internal functions
Function, match-property-p: Internal functions
Function, metadata-directory-p: Exported functions
Function, read-metadata: Internal functions
Function, remove-empty-metadata-directory: Internal functions

G
Generic Function, (setf metadata): Exported generic functions
Generic Function, (setf property): Exported generic functions
Generic Function, copy-file: Exported generic functions
Generic Function, delete-file: Exported generic functions
Generic Function, delete-metadata-file: Internal generic functions
Generic Function, fs-object: Exported generic functions
Generic Function, list-directory: Exported generic functions
Generic Function, load-metadata: Internal generic functions
Generic Function, metadata: Exported generic functions
Generic Function, metadata-directory: Internal generic functions
Generic Function, metadata-pathname: Internal generic functions
Generic Function, metadata-pathnames: Exported generic functions
Generic Function, move-file: Exported generic functions
Generic Function, pathname: Exported generic functions
Generic Function, property: Exported generic functions
Generic Function, remove-metadata: Exported generic functions
Generic Function, remove-property: Exported generic functions
Generic Function, rename-file: Exported generic functions
Generic Function, save-metadata: Exported generic functions

L
list-directory: Exported generic functions
list-directory: Exported generic functions
list-directory: Exported generic functions
load-metadata: Internal generic functions
load-metadata: Internal generic functions

M
Macro, define-file-system-object: Exported macros
make-file-system-object-from-file: Internal functions
match-property-p: Internal functions
metadata: Exported generic functions
metadata: Exported generic functions
metadata-directory: Internal generic functions
metadata-directory: Internal generic functions
metadata-directory: Internal generic functions
metadata-directory-p: Exported functions
metadata-pathname: Internal generic functions
metadata-pathname: Internal generic functions
metadata-pathname: Internal generic functions
metadata-pathnames: Exported generic functions
metadata-pathnames: Exported generic functions
Method, (setf metadata): Exported generic functions
Method, (setf property): Exported generic functions
Method, copy-file: Exported generic functions
Method, copy-file: Exported generic functions
Method, delete-file: Exported generic functions
Method, delete-file: Exported generic functions
Method, delete-file: Exported generic functions
Method, delete-file: Exported generic functions
Method, delete-metadata-file: Internal generic functions
Method, delete-metadata-file: Internal generic functions
Method, fs-object: Exported generic functions
Method, fs-object: Exported generic functions
Method, fs-object: Exported generic functions
Method, list-directory: Exported generic functions
Method, list-directory: Exported generic functions
Method, load-metadata: Internal generic functions
Method, metadata: Exported generic functions
Method, metadata-directory: Internal generic functions
Method, metadata-directory: Internal generic functions
Method, metadata-pathname: Internal generic functions
Method, metadata-pathname: Internal generic functions
Method, metadata-pathnames: Exported generic functions
Method, move-file: Exported generic functions
Method, move-file: Exported generic functions
Method, move-file: Exported generic functions
Method, pathname: Exported generic functions
Method, pathname: Exported generic functions
Method, property: Exported generic functions
Method, remove-metadata: Exported generic functions
Method, remove-property: Exported generic functions
Method, rename-file: Exported generic functions
Method, rename-file: Exported generic functions
Method, rename-file: Exported generic functions
Method, save-metadata: Exported generic functions
move-file: Exported generic functions
move-file: Exported generic functions
move-file: Exported generic functions
move-file: Exported generic functions

P
pathname: Exported generic functions
pathname: Exported generic functions
pathname: Exported generic functions
property: Exported generic functions
property: Exported generic functions

R
read-metadata: Internal functions
remove-empty-metadata-directory: Internal functions
remove-metadata: Exported generic functions
remove-metadata: Exported generic functions
remove-property: Exported generic functions
remove-property: Exported generic functions
rename-file: Exported generic functions
rename-file: Exported generic functions
rename-file: Exported generic functions
rename-file: Exported generic functions

S
save-metadata: Exported generic functions
save-metadata: Exported generic functions

Jump to:   (  
C   D   F   G   L   M   P   R   S  

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

A.3 Variables

Jump to:   *  
M   P   S  
Index Entry  Section

*
*auto-save*: Exported special variables
*default-file-class*: Exported special variables
*file-types-table*: Internal special variables
*metadata-directory-name*: Exported special variables

M
metadata: Exported classes

P
pathname: Exported classes

S
Slot, metadata: Exported classes
Slot, pathname: Exported classes
Special Variable, *auto-save*: Exported special variables
Special Variable, *default-file-class*: Exported special variables
Special Variable, *file-types-table*: Internal special variables
Special Variable, *metadata-directory-name*: Exported special variables

Jump to:   *  
M   P   S  

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

A.4 Data types

Jump to:   C   F   M   P   S  
Index Entry  Section

C
Class, file-system-object: Exported classes
Class, system-directory: Exported classes
Class, system-file: Exported classes

F
file-system-object: Exported classes

M
meta-file-system: The meta-file-system package
metafs: The metafs system
metafs-system: The metafs-system package

P
Package, meta-file-system: The meta-file-system package
Package, metafs-system: The metafs-system package

S
System, metafs: The metafs system
system-directory: Exported classes
system-file: Exported classes

Jump to:   C   F   M   P   S