The path-string Reference Manual

Table of Contents

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

The path-string Reference Manual

This is the path-string Reference Manual, version 0.1.0, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:24:12 2018 GMT+0.


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

1 Introduction

path-string

Build Status Coverage Status

Path string utility library based on nodejs' path.

This module contains utilities for handling and transforming file paths. Almost all these methods perform only string transformations. The file system is not consulted to check whether paths are valid.

The windows-compatible version has yet to be implemented.

Examples

(path-string:normalize "/foo/bar//baz/asdf/quux/..")

;; => "/foo/bar/baz/asdf"

(path-string:join "/foo" "bar" "baz/asdf" "quux" "..")

;; => "/foo/bar/baz/asdf"

(path-string:resolve "foo/bar" "/tmp/file/" ".." "a/../subfile")

;; => "/tmp/subfile"

(path-string:absolute-p "/tmp/file")

;; => #P"/tmp/file"

(path-string:relative "/data/orandea/test/aaa" "/data/orandea/impl/bbb")

;; => "../../impl/bbb"

(path-string:dirname "/foo/bar/baz/asdf/quux")

;; => "/foo/bar/baz/asdf"

(path-string:basename "/foo/bar/baz/asdf/quux.html")

;; => "quux.html"

(path-string:extname "index.html")

;; => ".html"

(path-string:parse "/home/user/dir/file.txt")

;; => "/"
;;    "/home/user/dir"
;;    "file.txt"
;;    ".txt"
;;    "file"

License

MIT


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 path-string

Author

Cayman Nava

License

MIT

Description

A path utility library

Long Description

# path-string
[![Build Status](https://travis-ci.org/wemeetagain/path-string.svg?branch=master)](https://travis-ci.org/wemeetagain/path-string)
[![Coverage Status](https://coveralls.io/repos/wemeetagain/path-string/badge.svg?branch=master&service=github)](https://coveralls.io/github/wemeetagain/path-string?branch=master)

Path string utility library based on nodejs’ [path](https://nodejs.org/api/path.html).

> This module contains utilities for handling and transforming file paths. Almost all these methods perform only string transformations. The file system is not consulted to check whether paths are valid.

The windows-compatible version has yet to be implemented.

## Examples

“‘lisp
(path-string:normalize "/foo/bar//baz/asdf/quux/..")

;; => "/foo/bar/baz/asdf"

(path-string:join "/foo" "bar" "baz/asdf" "quux" "..")

;; => "/foo/bar/baz/asdf"

(path-string:resolve "foo/bar" "/tmp/file/" ".." "a/../subfile")

;; => "/tmp/subfile"

(path-string:absolute-p "/tmp/file")

;; => #P"/tmp/file"

(path-string:relative "/data/orandea/test/aaa" "/data/orandea/impl/bbb")

;; => "../../impl/bbb"

(path-string:dirname "/foo/bar/baz/asdf/quux")

;; => "/foo/bar/baz/asdf"

(path-string:basename "/foo/bar/baz/asdf/quux.html")

;; => "quux.html"

(path-string:extname "index.html")

;; => ".html"

(path-string:parse "/home/user/dir/file.txt")

;; => "/"
;; "/home/user/dir"
;; "file.txt"
;; ".txt"
;; "file"
“‘

## License

MIT

Version

0.1.0

Dependencies
Source

path-string.asd (file)

Component

src (module)


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

3 Modules

Modules are listed depth-first from the system components tree.


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

3.1 path-string/src

Parent

path-string (system)

Location

src/

Components

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

4 Files

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


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

4.1 Lisp


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

4.1.1 path-string.asd

Location

path-string.asd

Systems

path-string (system)


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

4.1.2 path-string/src/util.lisp

Parent

src (module)

Location

src/util.lisp

Packages

path-string.util

Exported Definitions

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

4.1.3 path-string/src/posix.lisp

Dependency

util.lisp (file)

Parent

src (module)

Location

src/posix.lisp

Packages

path-string.posix

Exported Definitions

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

4.1.4 path-string/src/path-string.lisp

Dependency

posix.lisp (file)

Parent

src (module)

Location

src/path-string.lisp

Packages

path-string


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

4.1.5 path-string/src/documentation.lisp

Dependency

path-string.lisp (file)

Parent

src (module)

Location

src/documentation.lisp


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

5 Packages

Packages are listed by definition order.


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

5.1 path-string.util

Source

util.lisp (file)

Use List

common-lisp

Exported Definitions

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

5.2 path-string.posix

Source

posix.lisp (file)

Use List

common-lisp

Used By List

path-string

Exported Definitions

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

5.3 path-string

Source

path-string.lisp (file)

Use List

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

6 Definitions

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


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

6.1 Exported definitions


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

6.1.1 Special variables

Special Variable: *delimiter*

The platform-specific path delimiter, ’;’ or ’;’.

Package

path-string.posix

Source

posix.lisp (file)

Special Variable: *posix-split-path-re*
Package

path-string.util

Source

util.lisp (file)

Special Variable: *sep*

The platform-specific file separator, ’\’ or ’/’.

Package

path-string.posix

Source

posix.lisp (file)


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

6.1.2 Functions

Function: absolute-p PATH

Determines whether the path is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.

Package

path-string.posix

Source

posix.lisp (file)

Function: basename PATH &optional EXT

Return the last portion of a path. Similar to the Unix baseline command.

Package

path-string.posix

Source

posix.lisp (file)

Function: dirname PATH

Return the directory name of a path. Similar to the Unix dirname command.

Package

path-string.posix

Source

posix.lisp (file)

Function: extname PATH

Return the extension of the path, from the last ’.’ to the end of the
string in the last portion of the path. If there is no ’.’ in the last portion of the path or the first character of it is ’.’, then then return an empty string.

Package

path-string.posix

Source

posix.lisp (file)

Function: join &rest PATHS

Join all arguments together and normalize the resulting path.

Package

path-string.posix

Source

posix.lisp (file)

Function: normalize PATH

Normalize a path string, taking care of ’..’ and ’.’ parts.

Package

path-string.posix

Source

posix.lisp (file)

Function: normalize-list PARTS &optional ALLOW-ABOVE-ROOT-P
Package

path-string.util

Source

util.lisp (file)

Function: parse PATH

Returns a list of path pieces (ROOT DIR BASE EXT NAME) from a path string.

Package

path-string.posix

Source

posix.lisp (file)

Function: posix-format-path PATH ABSOLUTE-P
Package

path-string.util

Source

util.lisp (file)

Function: posix-join-components COMPONENTS
Package

path-string.util

Source

util.lisp (file)

Function: posix-split-path PATH
Package

path-string.util

Source

util.lisp (file)

Function: relative FROM TO

Solve the relative path from FROM to TO.

Package

path-string.posix

Source

posix.lisp (file)

Function: resolve &rest PATHS

Resolves the last argument to an absolute path

Package

path-string.posix

Source

posix.lisp (file)

Function: trim-list LIST
Package

path-string.util

Source

util.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   M   P  
Index Entry  Section

F
File, Lisp, path-string.asd: The path-string<dot>asd file
File, Lisp, path-string/src/documentation.lisp: The path-string/src/documentation<dot>lisp file
File, Lisp, path-string/src/path-string.lisp: The path-string/src/path-string<dot>lisp file
File, Lisp, path-string/src/posix.lisp: The path-string/src/posix<dot>lisp file
File, Lisp, path-string/src/util.lisp: The path-string/src/util<dot>lisp file

L
Lisp File, path-string.asd: The path-string<dot>asd file
Lisp File, path-string/src/documentation.lisp: The path-string/src/documentation<dot>lisp file
Lisp File, path-string/src/path-string.lisp: The path-string/src/path-string<dot>lisp file
Lisp File, path-string/src/posix.lisp: The path-string/src/posix<dot>lisp file
Lisp File, path-string/src/util.lisp: The path-string/src/util<dot>lisp file

M
Module, path-string/src: The path-string/src module

P
path-string.asd: The path-string<dot>asd file
path-string/src: The path-string/src module
path-string/src/documentation.lisp: The path-string/src/documentation<dot>lisp file
path-string/src/path-string.lisp: The path-string/src/path-string<dot>lisp file
path-string/src/posix.lisp: The path-string/src/posix<dot>lisp file
path-string/src/util.lisp: The path-string/src/util<dot>lisp file

Jump to:   F   L   M   P  

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

A.2 Functions

Jump to:   A   B   D   E   F   J   N   P   R   T  
Index Entry  Section

A
absolute-p: Exported functions

B
basename: Exported functions

D
dirname: Exported functions

E
extname: Exported functions

F
Function, absolute-p: Exported functions
Function, basename: Exported functions
Function, dirname: Exported functions
Function, extname: Exported functions
Function, join: Exported functions
Function, normalize: Exported functions
Function, normalize-list: Exported functions
Function, parse: Exported functions
Function, posix-format-path: Exported functions
Function, posix-join-components: Exported functions
Function, posix-split-path: Exported functions
Function, relative: Exported functions
Function, resolve: Exported functions
Function, trim-list: Exported functions

J
join: Exported functions

N
normalize: Exported functions
normalize-list: Exported functions

P
parse: Exported functions
posix-format-path: Exported functions
posix-join-components: Exported functions
posix-split-path: Exported functions

R
relative: Exported functions
resolve: Exported functions

T
trim-list: Exported functions

Jump to:   A   B   D   E   F   J   N   P   R   T  

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*delimiter*: Exported special variables
*posix-split-path-re*: Exported special variables
*sep*: Exported special variables

S
Special Variable, *delimiter*: Exported special variables
Special Variable, *posix-split-path-re*: Exported special variables
Special Variable, *sep*: Exported special variables

Jump to:   *  
S  

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

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, path-string: The path-string package
Package, path-string.posix: The path-string<dot>posix package
Package, path-string.util: The path-string<dot>util package
path-string: The path-string system
path-string: The path-string package
path-string.posix: The path-string<dot>posix package
path-string.util: The path-string<dot>util package

S
System, path-string: The path-string system

Jump to:   P   S