Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Filesystem access in Scheme: API standards?

0 views
Skip to first unread message

George Caswell

unread,
Jan 8, 2002, 3:46:28 PM1/8/02
to

Hi,

Recently my favorite Scheme implementation, LispMe for PalmOS, got a new
major release - it now supports compile-time definition of new datatypes. As
a result, I'm planning a "file" datatype and a set of new functions for
accessing files on the flash memory storage cards available on certain PalmOS
models. So, I have two questions:

1: Is there a good set of standardized semantics for file access in Scheme?
I want the library to support access of binary data as well as text, and to
support other relevant operations: directory listing, creating/deleting files
and directories, etc. I was thinking of emulating parts of the POSIX library
from Guile, but that part of the documentation seems to be missing.
2: I would like to somehow support mechanisms for allowing Scheme code to
be notified when cards are ejected or inserted, but I haven't thought of a
good way to do it. In C, the notifications are provided by a re-entrant call
to the application's main routine. I'm not quite sure how a notification
like that should be implemented for a Scheme VM, however - I suppose Scheme
code could poll to see if any such notifications have been enqueued, or block
waiting for such an event, or maybe even use something like a call/cc to enter
a filesystem-critical-region, where the continuation would be called if a card
event happened (in C++, this would be equivalent to an exception being thrown
by the filesystem library)

Thanks in advance,

---GEC
Projects page: http://home.maine.rr.com/tetsujin/
(M-x depeche-mode)
"Must... Finish... Zaku..."

Michael Sperber [Mr. Preprocessor]

unread,
Jan 9, 2002, 4:09:15 AM1/9/02
to tets...@users.sourceforge.net
>>>>> "GEC" == George Caswell <tets...@maine.rr.com> writes:

GEC> Hi,

GEC> Recently my favorite Scheme implementation, LispMe for PalmOS, got a new
GEC> major release - it now supports compile-time definition of new datatypes. As
GEC> a result, I'm planning a "file" datatype and a set of new functions for
GEC> accessing files on the flash memory storage cards available on certain PalmOS
GEC> models. So, I have two questions:

GEC> 1: Is there a good set of standardized semantics for file access in Scheme?
GEC> I want the library to support access of binary data as well as text, and to
GEC> support other relevant operations: directory listing, creating/deleting files
GEC> and directories, etc. I was thinking of emulating parts of the POSIX library
GEC> from Guile, but that part of the documentation seems to be missing.

I recommend a look at the POSIX subsystem in Scheme 48 or that in
scsh. Both are well-documented.

--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

0 new messages