|cage 7990db6224 - increased version number.||1 day ago|
|src||1 day ago|
|tests||1 day ago|
|COPYING||3 weeks ago|
|COPYING.LESSER||3 weeks ago|
|Changelog||1 day ago|
|LICENSE||3 weeks ago|
|README.org||2 weeks ago|
|README.txt||2 weeks ago|
|purgatory-tests.asd||3 weeks ago|
|purgatory.asd||1 day ago|
This library aims to be an implementation of the 9p file protocol as described in:
The library is under development,most of the protocol has been implemented except for Twstat (https://man.cat-v.org/plan_9/5/stat); bugs, of course, exists, API may changes.
needs to be installed (via quicklisp).
Of course a 9p server is needed.
The best way to get purgatory working is using the excellent quicklisp
#+BEGIN_SRC common-lisp (ql:quickload "9p-client") #+END_SRC
A typical usage of the library should starts with a code similar to the one below:
#+BEGIN_SRC common-lisp (let ((messages-sent '()) (root-fid (mount stream root))) ...) #+END_SRC
Note that `stream` should be a stream of
(unsigned-byte 8) and
likely is created by a client socket. The file
./tests/all-tests.lisp contains a small macro
with-open-ssl-stream that will help creating a TLS stream using
The file ./tests/protocol-tests.lisp contains a lot of examples about the usage of the library.
There are quite a few high level functions to use the filesystem that are listed below:
Returns the fid to the last element of `path'
If the last element of `path' is a directory the directory is created with permissions: #o760.
It `path' already reference a valid file it is opened for read and write.
This fid can be used by `read-directory` to get the directory entries (see the struct `stat')
`Dir-fid' is usually the values returned by `open-directory`.
This function on success returns tree values:
Each call to this function on the same directory fid, except the first, must use the offset returned by the last call, for example
#+BEGIN_SRC common-lisp (let* ((dir-fid (open-directory stream root-fid path))) (multiple-value-bind (next-dir-fid stat stat-size) (read-directory stream dir-fid) ; offset 0 on the first call (multiple-value-bind (next-dir-fid-2 stat-2 next-stat-size-2) (read-directory stream dir-fid stat-size) ; offset equals ; to stat-size ; from previous ; call ...))) #+END_SRC
Note: the destination file is overwritten if does exists."
Also checking the protocol documentation is useful https://man.cat-v.org/plan_9/5/intro
Please send bug reports or patches to the issue tracker.
This library is released under Lisp Lesser General Public license (see COPYING.LESSER file)
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
My deep thanks to op for the support and redfog for the name of the library, Thank you!