The fs-utils Reference Manual

Table of Contents

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

The fs-utils Reference Manual

This is the fs-utils Reference Manual, version 1.0.0, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 14:37:49 2018 GMT+0.


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

1 Introduction

fs-utils

Utilities for working with files and file paths.

Overview

This provides a means to access and read files relative to a project. It is useful for loading assets required within a project, and behaves correctly when distributing the project in the form of a dumped lisp image.

Install

(ql:quickload :fs-utils)

Usage

Get the path to a directory or file, relative to the project root directory.

(path :some-system "path/to/some/file")

:SOME-SYSTEM is the name of the project's ASDF system. Note that the file is optional if you just want the absolute path to a directory including the trailing slash character.

Read a file:

(read-file "resources/some-resource.lisp")

This will read the first s-expression located at "resources/some-resource.lisp", relative to the project root directory. It will not evaluate anything.

Map over a directory's files, performing an effect for all files that match a particular filter:

(map-files "path/to/dir" #'effect :filter #'filter :recursive t)

This will recursively iterate over every file in the given directory, running the function EFFECT on each if and only if the function FILTER returns T. Both EFFECT and FILTER must be defined to take one required argument - the path to the current file.

License

Copyright © 2015 Michael Fiano michael.fiano@gmail.com.

Licensed under the MIT License.

A copy of the license is available here.


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 fs-utils

Maintainer

Michael Fiano <michael.fiano@gmail.com>

Author

Michael Fiano <michael.fiano@gmail.com>

Home Page

https://github.com/mfiano/fs-utils

Source Control

(:git "git@github.com:mfiano/fs-utils.git")

Bug Tracker

https://github.com/mfiano/fs-utils/issues

License

MIT

Description

Utilities for working with files and file paths.

Long Description

# fs-utils

Utilities for working with files and file paths.

## Overview

This provides a means to access and read files relative to a project. It is useful for loading assets required within a project, and behaves correctly when distributing the project in the form of a dumped lisp image.

## Install

“‘ lisp
(ql:quickload :fs-utils)
“‘

## Usage

Get the path to a directory or file, relative to the project root directory.

“‘ lisp
(path :some-system "path/to/some/file")
“‘

‘:SOME-SYSTEM‘ is the name of the project’s ASDF system. Note that the file is optional if you just want the absolute path to a directory including the trailing slash character.

Read a file:

“‘ lisp
(read-file "resources/some-resource.lisp")
“‘

This will read the first s-expression located at "resources/some-resource.lisp", relative to the project root directory. It will not evaluate anything.

Map over a directory’s files, performing an effect for all files that match a particular filter:

“‘ lisp
(map-files "path/to/dir" #’effect :filter #’filter :recursive t)
“‘

This will recursively iterate over every file in the given directory, running the function ‘EFFECT‘ on each if and only if the function ‘FILTER‘ returns ‘T‘. Both ‘EFFECT‘ and ‘FILTER‘ must be defined to take one required argument - the path to the current file.

## License

Copyright © 2015 Michael Fiano <michael.fiano@gmail.com>.

Licensed under the MIT License.

A copy of the license is available [here](LICENSE).

Version

1.0.0

Dependency

uiop

Source

fs-utils.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 fs-utils.asd

Location

/home/quickbuilder/quicklisp/dists/quicklisp/software/fs-utils-20171019-git/fs-utils.asd

Systems

fs-utils (system)


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

3.1.2 fs-utils/package.lisp

Parent

fs-utils (system)

Location

package.lisp

Packages

fs-utils


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

3.1.3 fs-utils/fs-utils.lisp

Dependency

package.lisp (file)

Parent

fs-utils (system)

Location

fs-utils.lisp

Exported Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 fs-utils

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions

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

5 Definitions

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


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

5.1 Exported definitions


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

5.1.1 Functions

Function: map-files PATH EFFECT &key FILTER RECURSIVE
Package

fs-utils

Source

fs-utils.lisp (file)

Function: path SYSTEM &optional PATH
Package

fs-utils

Source

fs-utils.lisp (file)

Function: read-file PATH
Package

fs-utils

Source

fs-utils.lisp (file)


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, fs-utils.asd: The fs-utils<dot>asd file
File, Lisp, fs-utils/fs-utils.lisp: The fs-utils/fs-utils<dot>lisp file
File, Lisp, fs-utils/package.lisp: The fs-utils/package<dot>lisp file
fs-utils.asd: The fs-utils<dot>asd file
fs-utils/fs-utils.lisp: The fs-utils/fs-utils<dot>lisp file
fs-utils/package.lisp: The fs-utils/package<dot>lisp file

L
Lisp File, fs-utils.asd: The fs-utils<dot>asd file
Lisp File, fs-utils/fs-utils.lisp: The fs-utils/fs-utils<dot>lisp file
Lisp File, fs-utils/package.lisp: The fs-utils/package<dot>lisp file

Jump to:   F   L  

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

A.2 Functions

Jump to:   F   M   P   R  
Index Entry  Section

F
Function, map-files: Exported functions
Function, path: Exported functions
Function, read-file: Exported functions

M
map-files: Exported functions

P
path: Exported functions

R
read-file: Exported functions

Jump to:   F   M   P   R  

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

A.3 Variables


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

A.4 Data types

Jump to:   F   P   S  
Index Entry  Section

F
fs-utils: The fs-utils system
fs-utils: The fs-utils package

P
Package, fs-utils: The fs-utils package

S
System, fs-utils: The fs-utils system

Jump to:   F   P   S