include "sys.m"; sys:= load Sys Sys->PATH; fstat: fn(fd: ref FD) : (int, Dir); fwstat: fn(fd: ref FD; d: Dir) : int; stat: fn(name: string) : (int, Dir); wstat: fn(name: string, d: Dir): int;
The Dir Abstract Data Type
File status is managed via the Dir abstract data type:
Qid: adt { path: int; vers: int; }; Dir: adt { name: string; uid: string; gid: string; qid: Qid; mode: int; atime: int; mtime: int; length: int; dtype: int; dev: int; };
Limbo System Module
|
dirread - read directory
|
open, create - open/create a file for reading or writing
|
stat, wstat - inquire or change file attributes in Chapter 3
|
Files and directories always have read and execute permission. They cannot be changed. Files without write permission cannot be removed.
The uid attribute is supported.
The gid attribute is interpreted always to mean the special group InfernoGroup, even if the underlying Windows system maintains other groups for the file. Special group Everyone is used to represent 'other' for permissions.