file

File file.str
Author unknown
Since unknown
No information available.




Statistics


General
Lines of code 265
Stratego
Module number 1 (0% documented)
Constructor number 5 (0% documented)
Overlay number 0
Strategy number 29 (72% documented)
Rule number 0
DynamicRule number 0



Constructor summary


F_OK(ATerm ) n/a file.str
Pipe(ATerm , ATerm ) n/a file.str
R_OK(ATerm ) n/a file.str
W_OK(ATerm ) n/a file.str
X_OK(ATerm ) n/a file.str

Strategy summary


access n/a file.str
chdir Change current working directory file.str
close Closing a file file.str
creat Opening a file file.str
dup Duplicating a file descriptor file.str
dup2 n/a file.str
fdopen The fdopen function associates a stream with the existing file descriptor, fd file.str
filemode n/a file.str
fileno The function fileno examines the argument stream and returns its integer descriptor file.str
getcwd Returns the current working directory file.str
isatty Succeeds if file descriptor refers to a terminal device file.str
isblk n/a file.str
ischr n/a file.str
isdir Succeeds when applied to a File which is a directory file.str
isfifo n/a file.str
islnk n/a file.str
isreg n/a file.str
issock n/a file.str
link-file link-file creats a hard link from file 'new' to file 'old' file.str
mkdir(ATerm mode) Create directory file.str
mkdir n/a file.str
modification-time Returns the modification time of a file in sections since epoch file.str
open n/a file.str
pipe Pipe creates a pair Pipe(fd1, fd2) of file descriptors, pointing to a pipe inode, and places them in the array pointed to by filedes file.str
readdir The readdir() function returns a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by dir file.str
rmdir Remove empty directory file.str
STDERR_FILENO n/a file.str
STDIN_FILENO n/a file.str
STDOUT_FILENO n/a file.str



Strategy details


ATerm chdir
File file.str
Author unknown
Since unknown
 

Change current working directory.


type String -> String

 
ATerm close
File file.str
Author unknown
Since unknown
 

Closing a file

Deallocates a file descriptor



 
ATerm creat
File file.str
Author unknown
Since unknown
 

Opening a file



 
ATerm dup
File file.str
Author unknown
Since unknown
 

Duplicating a file descriptor



 
ATerm fdopen
File file.str
Author unknown
Since unknown
 

The fdopen function associates a stream with the existing file descriptor, fd.

The mode of the stream ("r", "r+", "w", "w+", "a", "a+") must be compatible with the mode of the file descriptor. The file position


type (FileDescr, String) -> Stream

 
ATerm fileno
File file.str
Author unknown
Since unknown
 

The function fileno examines the argument stream and returns its integer descriptor


type Stream -> FileDescr

 
ATerm getcwd
File file.str
Author unknown
Since unknown
 

Returns the current working directory.



 
ATerm isatty
File file.str
Author unknown
Since unknown
 

Succeeds if file descriptor refers to a terminal device.



 
ATerm isblk
File file.str
Author unknown
Since unknown
 

No information available.


type File -> FileMode

 
ATerm ischr
File file.str
Author unknown
Since unknown
 

No information available.


type File -> FileMode

 
ATerm isdir
File file.str
Author unknown
Since unknown
 

Succeeds when applied to a File which is a directory.

Idiom: <file-exists ; filemode ; isdir> "/etc"


type File -> FileMode

 
ATerm isfifo
File file.str
Author unknown
Since unknown
 

No information available.


type File -> FileMode

 
ATerm islnk
File file.str
Author unknown
Since unknown
 

No information available.


type File -> FileMode

 
ATerm isreg
File file.str
Author unknown
Since unknown
 

No information available.


type File -> FileMode

 
ATerm issock
File file.str
Author unknown
Since unknown
 

No information available.


type File -> FileMode

 
ATerm link-file
File file.str
Author unknown
Since unknown
 

link-file creats a hard link from file 'new' to file 'old'.



 
ATerm mkdir(ATerm mode)
File file.str
Author unknown
Since unknown
 

Create directory


type String -> Int

 
ATerm modification-time
File file.str
Author unknown
Since unknown
 

Returns the modification time of a file in sections sinceepoch.


type String -> Int

 
ATerm pipe
File file.str
Author unknown
Since unknown
 

Pipe creates a pair Pipe(fd1, fd2) of file descriptors, pointingto a pipe inode, and places them in the array pointed to by filedes.fd1 is for reading, fd2 is for writing.


type _ -> Pipe

 
ATerm readdir
File file.str
Author unknown
Since unknown
 

The readdir() function returns a pointer to a direntstructure representing the next directory entry in thedirectory stream pointed to by dir. It returns NULL onreaching the end-of-file or if an error occurred.



 
ATerm rmdir
File file.str
Author unknown
Since unknown
 

Remove empty directory


type String -> Int