jaredcdavis / fileutils

File Utilities Library for Common Lisp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Common Lisp File Utilities

Work in progress, not ready for public consumption

I want a sensible way to work with Unix and Windows file systems from Common Lisp.

Possible starting points:

  • Read about files and file i/o from Peter Seibel's excellent Practical Common Lisp book.

  • Use Quicklisp to install libraries such as

    • CL-FAD which provides some basic functions like file-exists-p, pathname-as-file, list-directory, copy-file, etc. It has a nice manual. It is based on pathnames.

    • OSICAT which provides many similar functions, and also has operations like file-permissions, make-link, read-link, file-kind, and so forth.

    • UIOP, part of ASDF, which allegedly has a README file but it's a broken link, but as of this writing there is a manual here, and it is allegedly recommended over CL-FAD now by Fare, who also recommends IOLIB except that doesn't make any sense because the IOLIB manual doesn't say anything about pathnames and the tutorial that mentions that IOLIB includes a pathname library, but then never again even includes the word pathname, and so this is very frustrating. Anyway, UIOP seems to have a lot of the CL-FAD/OSICAT functions and also new stuff like pathname-parent-directory-pathname.

Hey this might be really useful

After trying to work with this stuff for a good while, I've concluded that

  • I still don't understand a lot about Common Lisp pathnames.

  • It is really hard and frustrating to try to implement functions like basename and dirname in any sensible way, even on a single Lisp.

  • There are no guarantees and no way to know your code is portable, because the pathname construct gives CL implementations too much flexibility.

  • It just shouldn't be this hard.

Fileutils

It seems like we could do a lot better by trying to entirely avoid Lisp pathnames. I want something that is:

  • Portable across many Lisps and operating systems.

  • Relatively modest in its functionality.

  • Well documented.

  • Well tested.

About

File Utilities Library for Common Lisp

License:Other


Languages

Language:Common Lisp 78.0%Language:Perl 7.6%Language:CSS 7.5%Language:JavaScript 6.9%