Some things I have needed sometimes:
* Procedure(s) to set a named file's permissions, owner, and/or group.
* Procedure to get the permissions, owner, and group of a named file.
Also handy would be:
* The standard "open-output-file", "call-with-output-file", etc., have
keyword argument to specify the desired permissions when/if creating the
file. (Unfortunately, this can't be implemented as well in a PLaneT
package as it can in the Racket core.)
The permissions bits could be represented in the API as a number, on
which users do bitwise arithmetic.
For API representation of the owner and group, I'm not sure whether
numbers, strings, or ADTs should be preferred. For casual applications
programming, I usually want strings; for systems programming, I usually
want the actual UID and GID. Maybe when setting, we can provide a
number or string, and when getting we receive a number (with separate
procedures available to map the numbers to the strings).
I would be willing to implement this, but I don't want to be redundant
with anything anyone else has done or is planning.
--
http://www.neilvandyke.org/
_________________________________________________
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
HTH,
N.
On Mon, Aug 30, 2010 at 9:50 AM, Neil Van Dyke <ne...@neilvandyke.org> wrote:
> Has anyone already implemented Racket API for dealing with Unix file
> permissions/owner/group?
...
> * Procedure(s) to set a named file's permissions, owner, and/or group.
>
> * Procedure to get the permissions, owner, and group of a named file.
Sure, I did that. I'll attach a quick demonstration.