String pathname utilities
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
t
.travis.yml
LICENSE
README.md
path-string-test.asd
path-string.asd
version.txt

README.md

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