parrotcode: Files and Directories PMC | |
Contents | PMCs |
src/classes/os.pmc - Files and Directories PMC
OS
is a singleton class which provides access to the filesystem files and directories.
void *get_pointer()
void set_pointer(void *ptr)
STRING *cwd()
void cd(STRING *path)
path
.void rm(STRING *path)
remove
to remove the file or empty directory specified by path
.void mkdir(STRING *path, STRING *mode)
path
with mode mode
.fixedpmcarray *stat(STRING *path)
0 dev device number of filesystem
1 ino inode number
2 mode file mode (type and permissions)
3 nlink number of (hard) links to the file
4 uid numeric user ID of file's owner
5 gid numeric group ID of file's owner
6 rdev the device identifier (special files only)
7 size total size of file, in bytes
8 atime last access time in seconds since the epoch
9 mtime last modify time in seconds since the epoch
10 ctime inode change time in seconds since the epoch (*)
11 blksize preferred block size for file system I/O
12 blocks actual number of blocks allocated
void symlink(STRING *from, STRING *to)
void link(STRING *from, STRING *to)
INTVAL umask(INTVAL mask)
chdir(2), getcwd(3), unlink(2), mkdir(2), stat(2), symlink(2),
link(2), umask(2)
|