Section contents
cfile.oxh
<TBS>
this& = NewFile&:
Creates a file interface object and returns a handle which allows the object to be manipulated.
this& |
An value which represents the created file interface |
If the object could not be created then an error is generated
which should be trapped by an ONERR
handler.
LOCAL this& this& = NewFile&: DeleteFile:(this&)
DeleteFile:(BYREF this&)
Destroys the file interface object.
BYREF this& |
A handle to a file interface object |
LOCAL this& this& = NewFile&: DeleteFile:(this&)
err% = FileAtt%:(this&,BYREF attributes&)
Get the file attributes.
this& |
A handle to a file interface object |
BYREF attributes& |
The file attributes |
err% |
An error code |
err% = FileChangeMode%:(this&,mode&)
Chnage the file access mode.
this& |
A handle to a file interface object |
mode& |
The new file acces mode |
err% |
An error code |
FileClose:(this&)
Close the file.
this& |
A handle to a file interface object |
err% = FileCreate%:(this&,fs&,name$,mode&)
Create a new file.
this& |
A handle to a file interface object |
fs& |
A handle to a file server object |
name$ |
The name of the file to create |
mode& |
The mode of the file opened |
err% |
An error code |
FileOpen, FileReplace, FileTemp
err% = FileFlush%:(this&)
Flushes the data in the internal buffers to the storage device.
this& |
A handle to a file interface object |
err% |
An error code |
err% = FileLock%:(this&,pos&,length&)
Locks the bytes starting at pos&
for length&
bytes.
this& |
A handle to a file interface object |
pos& |
Offet from start of file |
length& |
Number of bytes to lock |
err% |
An error code |
err% = FileModified%:(this&,time&)
Gets the file modification time..
this& |
A handle to a file interface object |
time& |
A handle to a time object |
err% |
An error code |
err% = FileOpen%:(this&,fs&,name$,mode&)
Open an existing file.
this& |
A handle to a file interface object |
fs& |
A handle to a file server object |
name$ |
The name of the file to open |
mode& |
The mode of the file opened |
err% |
An error code |
FileCreate, FileReplace, FileTemp
err% = FileRead%:(this&,des&)
Read from file.
this& |
A handle to a file interface object |
des& |
A handle to a descriptor object |
err% |
An error code |
FileReadA, FileReadLen, FileReadLenA, FileReadPos, FileReadPosA, FileReadPosLen, FileReadPosLenA
FileReadA:(this&,des&,BYREF status&)
Asynchronous read from file
this& |
A handle to a file interface object |
des& |
A handle to a descriptor object |
BYREF status& |
The status of the asynchronous operation |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
FileRead, FileReadLen, FileReadLenA, FileReadPos, FileReadPosA, FileReadPosLen, FileReadPosLenA
err% = FileReadLen%:(this&,des&,length&)
Read from file.
this& |
A handle to a file interface object |
des& |
A handle to a descriptor object |
length& |
The number of bytes to read |
err% |
An error code |
FileRead, FileReadA, FileReadLenA, FileReadPos, FileReadPosA, FileReadPosLen, FileReadPosLenA
FileReadLenA:(this&,des&,length&,BYREF
status&)
Asynchronous read from file
this& |
A handle to a file interface object |
des& |
A handle to a descriptor object |
length& |
The number of bytes to read |
BYREF status& |
The status of the asynchronous operation |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
FileRead, FileReadA, FileReadLen, FileReadPos, FileReadPosA, FileReadPosLen, FileReadPosLenA
err% = FileReadPos%:(this&,pos&,des&)
Read from file.
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
des& |
A handle to a descriptor object |
err% |
An error code |
FileRead, FileReadA, FileReadLen, FileReadLenA, FileReadPosA, FileReadPosLen, FileReadPosLenA
FileReadPosA:(this&,pos&,des&,BYREF
status&)
Asynchronous read from file
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
des& |
A handle to a descriptor object |
BYREF status& |
The status of the asynchronous operation |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
FileRead, FileReadA, FileReadLen, FileReadLenA, FileReadPos, FileReadPosLen, FileReadPosLenA
err% = FileReadPosLen%:(this&,pos&,des&,length&)
Read from file.
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
des& |
A handle to a descriptor object |
length& |
The number of bytes to read |
err% |
An error code |
FileRead, FileReadA, FileReadLen, FileReadLenA, FileReadPos, FileReadPosA, FileReadPosLenA
FileReadPosLenA:(this&,pos&,des&,length&,BYREF
status&)
Asynchronous read from file
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
des& |
A handle to a descriptor object |
length& |
The number of bytes to read |
BYREF status& |
The status of the asynchronous operation |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
FileRead, FileReadA, FileReadLen, FileReadLenA, FileReadPos, FileReadPosA, FileReadPosLen
err% = FileRename%:(this&,name$)
Rename an open file.
this& |
A handle to a file interface object |
name$ |
The name of the file to create |
err% |
An error code |
err% = FileReplace%:(this&,fs&,name$,mode&)
Replace a file.
this& |
A handle to a file interface object |
fs& |
A handle to a file server object |
name$ |
The name of the file to create |
mode& |
The mode of the file opened |
err% |
An error code |
FileCreate, FileOpen, FileTemp
err% = FileSeek%:(this&,mode&,BYREF pos&)
Seek to the position pos&
according to the
operation mode&
..
this& |
A handle to a file interface object |
mode& |
The seek operation to perform |
BYREF pos& |
The offset to perform the seek operation |
err% |
An error code |
err% = FileSet%:(this&,time&,set&,clear&)
Set the attributes in set&
and clear the
attributes in clear&
and also sets the
modification time to time&
..
this& |
A handle to a file interface object |
time& |
A handle to a time object |
set& |
A mask of the attributes to set |
clear& |
A mask of the attributes to clear |
err% |
An error code |
FileAtt, FileModified, FileSetAtt, FileSetModified
err% = FileSetAtt%:(this&,set&,clear&)
Set the attributes in set&
and clear the
attributes in clear&
..
this& |
A handle to a file interface object |
set& |
A mask of the attributes to set |
clear& |
A mask of the attributes to clear |
err% |
An error code |
err% = FileSetModified%:(this&,time&)
Set the file modification time to that in time&
..
this& |
A handle to a file interface object |
time& |
A handle to a time object |
err% |
An error code |
err% = FileSetSize%:(this&,size&)
Changes the size of the file to size&
.
this& |
A handle to a file interface object |
size& |
The new size of the file |
err% |
An error code |
err% = FileSize%:(this&,BYREF size&)
get the size of the file.
this& |
A handle to a file interface object |
BYREF size& |
The size of the file |
err% |
An error code |
err% = FileTemp%:(this&,fs&,name$,des&,mode&)
Replace a file.
this& |
A handle to a file interface object |
fs& |
A handle to a file server object |
name$ |
The name of the file to create |
des& |
A handle to a descriptor object which contains the name of the created file |
mode& |
The mode of the file opened |
err% |
An error code |
FileCreate, FileOpen, FileReplace
err% = FileUnLock%:(this&,pos&,length&)
Unlocks the bytes starting at pos&
for length&
bytes.
this& |
A handle to a file interface object |
pos& |
Offet from start of file |
length& |
Number of bytes to unlock |
err% |
An error code |
err% = FileWrite%:(this&,des&)
Write to file.
this& |
A handle to a file interface object |
des& |
A handle to a descriptor object |
err% |
An error code |
FileWriteA, FileWriteLen, FileWriteLenA, FileWritePos, FileWritePosA, FileWritePosLen, FileWritePosLenA
FileWriteA:(this&,des&,BYREF status&)
Asynchronous write to file
this& |
A handle to a file interface object |
des& |
A handle to a descriptor object |
BYREF status& |
The status of the asynchronous operation |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
FileWrite, FileWriteLen, FileWriteLenA, FileWritePos, FileWritePosA, FileWritePosLen, FileWritePosLenA
err% = FileWrite%:(this&,str$)
Write to file.
this& |
A handle to a file interface object |
str$ |
A string to write |
err% |
An error code |
FileWriteA, FileWriteLen, FileWriteLenA, FileWritePos, FileWritePosA, FileWritePosLen, FileWritePosLenA
err% = FileWriteLen%:(this&,des&,length&)
Write to file.
this& |
A handle to a file interface object |
des& |
A handle to a descriptor object |
length& |
The number of bytes to write |
err% |
An error code |
FileWrite, FileWriteA, FileWriteLenA, FileWritePos, FileWritePosA, FileWritePosLen, FileWritePosLenA
FileWriteLenA:(this&,des&,length&,BYREF
status&)
Asynchronous write to file
this& |
A handle to a file interface object |
des& |
A handle to a descriptor object |
length& |
The number of bytes to write |
BYREF status& |
The status of the asynchronous operation |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
FileWrite, FileWriteA, FileWriteLen, FileWritePos, FileWritePosA, FileWritePosLen, FileWritePosLenA
err% = FileWriteLenStr%:(this&,str$,length&)
Write to file.
this& |
A handle to a file interface object |
str$ |
A string to write |
length& |
The number of bytes to write |
err% |
An error code |
FileWrite, FileWriteA, FileWriteLenA, FileWritePos, FileWritePosA, FileWritePosLen, FileWritePosLenA
err% = FileWritePos%:(this&,pos&,des&)
Write to file.
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
des& |
A handle to a descriptor object |
err% |
An error code |
FileWrite, FileWriteA, FileWriteLen, FileWriteLenA, FileWritePosA, FileWritePosLen, FileWritePosLenA
FileWritePosA:(this&,pos&,des&,BYREF
status&)
Asynchronous write to file
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
des& |
A handle to a descriptor object |
BYREF status& |
The status of the asynchronous operation |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
FileWrite, FileWriteA, FileWriteLen, FileWriteLenA, FileWritePos, FileWritePosLen, FileWritePosLenA
err% = FileWritePosStr%:(this&,pos&,str$)
Write to file.
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
str$ |
A string to write |
err% |
An error code |
FileWrite, FileWriteA, FileWriteLen, FileWriteLenA, FileWritePosA, FileWritePosLen, FileWritePosLenA
err% = FileWritePosLen%:(this&,pos&,des&,length&)
Write to file.
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
des& |
A handle to a descriptor object |
length& |
The number of bytes to write |
err% |
An error code |
FileWrite, FileWriteA, FileWriteLen, FileWriteLenA, FileWritePos, FileWritePosA, FileWritePosLenA
FileWritePosLenA:(this&,pos&,des&,length&,BYREF
status&)
Asynchronous write to file
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
des& |
A handle to a descriptor object |
length& |
The number of bytes to write |
BYREF status& |
The status of the asynchronous operation |
If the status&
object cannot be created then
an error is generated which should be trapped by an ONERR
handler.
FileWrite, FileWriteA, FileWriteLen, FileWriteLenA, FileWritePos, FileWritePosA, FileWritePosLen
err% = FileWritePosLenStr%:(this&,pos&,str$,length&)
Write to file.
this& |
A handle to a file interface object |
pos& |
Offset from start of file |
str$ |
A strin to write |
length& |
The number of bytes to write |
err% |
An error code |
FileWrite, FileWriteA, FileWriteLen, FileWriteLenA, FileWritePos, FileWritePosA, FileWritePosLenA