Portable file operations.
Strategy details
|
ATerm
|
base-filename
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Strips the directory from a pathname.
|
|
ATerm
|
dirname
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Returns directory portion of pathname in a POSIX compatible way.
|
|
ATerm
|
fclose
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Dissociates the named stream from its underlying file or set of functions.If the stream was being used for output, any buffered data is written first, using fflush(3).
|
|
ATerm
|
fgetc
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
fgetc() reads the next character from the stream and returns the ASCII code of the character as an Int. Fails on end of file or error.
|
|
ATerm
|
fopen
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Opens the file whose name is the string pointed to by pathname and returns a Stream associated with this file.For documentation on the mode string, see the man page offopen.
fails if the file couldn't be opened.
type
|
String * String -> Stream
|
|
|
ATerm
|
fputc
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Writes a Char to a Stream
type
|
(Char, Stream) -> Stream
|
|
|
ATerm
|
get-extension
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Get extension from filename
|
|
ATerm
|
guarantee-extension(ATerm ext)
|
Drops the current extension and replaces it with the specified extension.
|
|
ATerm
|
has-extension(ATerm ext)
|
File
|
file.str
|
Author
|
unknown
|
Since
|
0.15
|
|
Parameters
ATerm
ext
|
The required extension (without . )
|
|
Checks if the file extension is ext.
|
|
ATerm
|
is-abspath
|
File
|
file.str
|
Author
|
unknown
|
Since
|
0.9.4
|
|
Succeeds if the input pathname is an absolute path.
A pathname is absolute if it starts with a /.
|
|
ATerm
|
is-relpath
|
File
|
file.str
|
Author
|
unknown
|
Since
|
0.9.4
|
|
Succeeds if the input pathname is a relative path.
A pathname is relative if it does not start with a /.
|
|
ATerm
|
open-stream
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Opens a Stream associated to a FileLoc
type
|
(FileLoc, String) -> Stream
|
|
|
ATerm
|
puts
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Writes a String to stdout with a trailing newline and returns stdout.
|
|
ATerm
|
remove-extension
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Remove an extension from a file name.Returns the input if the file does not have an extension.
|
|
ATerm
|
stdin-stream
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Returns the Stream for stdin, stdout and stderr
|
|
ATerm
|
stdio-stream
|
File
|
file.str
|
Author
|
unknown
|
Since
|
unknown
|
|
No information available.
|
|
ATerm
|
test-extension(Strategy ext)
|
File
|
file.str
|
Author
|
unknown
|
Since
|
0.15
|
|
Parameters
Strategy
ext
|
Test for the file extension. Is applied to the plain file extension (without the .)
|
|
Tests if the file extension (everything after the . satisfies ext.
|
|