Previous | Top | Index | Next |
The following routines are available after loading the library file files.r with the command: CALL import "files.r".
Returns the filename stripped from the directory pathSAY filesize("/tmp/test.dat") /* test.dat */
Strips the non directory suffix from file nameSAY filesize("/tmp/test.dat") /* /tmp */
Returns the size of file in bytes. The file must not be opened.SAY filesize("test.dat")
Read one word from file file
SAY readword("test.dat")
READSTEM(file,stem[,pool][,Upper])
Read the entire file into stem using as default pool 0. The stem.0 contains the number of lines read.
CALL readstem "test.dat","file."
CALL readstem "test.dat","file.",1
Write the stem from pool pool into the file file. The stem.0 contains the number of lines to write.
CALL writestem "test.dat","file."
CALL writestem "test.dat","file.",1
Returns '1' if file exists, else '0'.SAY exist("test.dat")
Previous | Top | Index | Next |