home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
wkermit
/
lckfiodoc.txt
< prev
next >
Wrap
Text File
|
1985-11-10
|
4KB
|
143 lines
L C K F I O -- File I/O module
Z O P E N I -- Open an existing file for input. Return 1 if successful
zopeni(n,name)
int n = file number to use
char *name = name of file to open
Z O P E N O -- Open a new file for output. Return 1 if successful
zopeno(n,name)
int n = file number to use
char *name = name of file to open
Z C L O S E -- Close the given file. Return 1 if successful
zclose(n)
int n = number of file to close
Z C H I N -- Get a character from the input file.
Returns -1 if EOF, 0 otherwise.
zchin(n,c)
int n = number of file to read
char *c = character read
Z S O U T -- Write a string to the given file, buffered.
Returns -1 if ERROR, 0 otherwise
zsout(n,s)
int n = number of file to write to
char *s = character string to write
Z S O U T L -- Write string to file, with line terminator, buffered
Returns -1 if ERROR, 0 otherwise
zsoutl(n,s)
int n = number of file to write to
char *s = character string to write
Z S O U T X -- Write x characters to file, unbuffered.
Returns -1 if ERROR, 0 otherwise
zsoutx(n,s,x)
int n = number of file to write to
int x = number of character to write
char *s = character string to write
Z C H O U T -- Add a character to the given file.
Returns -1 if ERROR, 0 otherwise
zchout(n,c)
int n = number of file to write to
char c = character to write
C H K F N -- Internal function to verify file number is ok
Returns: -1 = File number n is out of range
0 = n is in range, but file is not open
1 = n in range and file is open
chkfn(n)
int n = file number to check
Z C H K I -- Check if input file exists and is readable
Returns: >= 0 if the file can be read (returns the size).
-1 if file doesn't exist or can't be accessed,
-2 if file exists but is not readable .
-3 if file exists but protected against read.
long zchki(name)
char *name = name of file to check
Z C H K O -- Check if output file can be created . Returns -1 if write
permission for the file would be denied, 0 otherwise.
zchko(name)
char *name = name of file to check
Z D E L E T -- Delete the named file.
zdelet(name)
char *name = name of file to delete
Z R T O L -- Convert remote filename into local form
For DOS, this means changing lowercase letters to uppercase.
zrtol(name,name2)
char *name = file name to be converted
char *name2 = converted file name
Z L T O R -- Convert filename from local format to common form.
Strip pathnames, directory names and uppercase.
zltor(name,name2)
char *name = file name to be converted
char *name2 = converted file name
Z N E X T -- Get name of next file from list created by zxpand().
Returns >0 if there's another file or 0 if no more files.
znext(fn)
char *fn = filename
Z N E W N -- Make a new name for the given file
znewn(fn,s)
char *fn = filename to be converted
char **s = pointer to converted file name
Z X P A N D -- Expand a wildcard string into an array of strings
Returns the number of files that match fn1,
with data structures set up so that first file (if any)
will be returned by the next znext() call.
zxpand(fn)
char *fn = filename to be expanded
Z N E X T -- Get name of next file from list created by zxpand().
Returns >0 if there's another file or 0 if no more files.
znext(fn)
char *fn = filename
Z F C D A T -- Return file creation date/time
zfcdat(fname,str)
char *fname = filename
char *str = string with date and time
Z F R E E -- Return total number of free bytes on drive specified
long zfree(drive)
char *drive = drive name to check
Z F P D A T -- Stamp a given file name with the given date
zfpdat(fname,dattim)
char *fname = name of file to stamp
cahr *dattim = date and time to stamp