fs-utils

2017-05-16

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

This system is not yet available to be installed automatically with Quicklisp. To manually install using Quicklisp, clone this repository into your local-projects directory and issue the following in your REPL:

(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 relative to the project:

(read-file :some-system "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.

License

Copyright ? 2015 Michael Fiano .

Licensed under the MIT License.

A copy of the license is available here.

Author
Michael Fiano <michael.fiano@gmail.com>
Maintainer
Michael Fiano <michael.fiano@gmail.com>
License
MIT