>>  <<  Ndx  Usr  Pri  Phr  Dic  Rel  Voc  !:  wd  Help  User

files: file access utilities

Name Type Description
fappend verb append text to file
fappends verb append string to file
fcopynew verb copies files if changed
fcopynews verb copies files as strings if changed
fdir verb file directory
ferase verb erases a file
fexist verb test if a file exists
fread verb read file
freadr verb read records from flat file
freads verb read file as string
freplace verb replace text in file
fselect verb file selection dialog
fsize verb return file size
fss verb file string search
fssrplc verb file string search and replace
fstamp verb returns file timestamp
fview verb view file
fwrite verb write text to file
fwrites verb write string to file

fappend

append text to file
	The text is first ravelled. The file is created if necessary.
Returns number of characters written, or an error message.
form: text fappend filename
example:
  'chatham' fappend 'newfile.txt'
7

fappends

append string to file
The text is first ravelled into a vector with each row
terminated by the CRLF pair. Any single LF or CR characters
in the text are converted into the CRLF pair.
The file is created if necessary. Returns number of characters
written, or an error message.

fcopynew

copies files if changed
form: tofile fcopynew fromfiles
returns: 0, size    not changed
         1, size    changed
         _1         failure

fcopynews

copies files as strings if changed
form: tofile fcopynews fromfiles
returns: 0, size    not changed
         1, size    changed
         _1         failure

fdir

file directory
example:
  fdir 'system\main\s*.ijs'

ferase

erases a file
Returns 1 if successful, otherwise _1

fexist

test if a file exists
Returns 1 if the file exists, otherwise 0.

fread

read file
y. is filename {;start size}
x. is optional:
   = b    read as boxed vector
   = m    read as matrix
   = s    read as string (same as freads)

freadr

read records from flat file
y. is filename {;record start, # of records}
records are assumed of fixed length delimited by
one (only) of CR, LF, or CRLF.
the result is a matrix of records.

freads

read file as string
y. is filename {;start size}
x. is optional (b and m same as fread):
   = b    read as boxed vector
   = m    read as matrix
freads

freplace

replace text in file
form: dat freplace file;pos

fselect

file selection dialog
y. = DOS filespec or ''
x. = optional file type list
returns user selection

fsize

return file size
returns file size or _1 if error

fss

file string search
form: str fss file
search file for string, returning indices

fssrplc

file string search and replace
form: (old;new) fssrplc file

fview

view file
uses standard Windows edit control,
which is limited to around 20K size.


>>  <<  Ndx  Usr  Pri  Phr  Dic  Rel  Voc  !:  wd  Help  User