Task Overview - Task
Task Overview - Library
The File task and associated library calls, handles file system functions.
Task Attributes
Task priority : 128 (normal priority) Task depends on : Tasks/OS/Library/OS.a
Task Description
Task description pending.
Library Description
To be written.
Task History
| | | | | 09 September 2010 | None | No history found as yet... | | | | |
Task Function Calls
Here follows a list of functions supplied by this library with a brief description of each. By clicking on a function name, further information will be shown.
Lib_FileAddPath Add a library path
Function prototype
BOOL Lib_FileAddPath( BYTE *path );
|
Input parameter(s)
| | | | BYTE *path | - ASCIIZ of path to add | | | |
Return value
Purpose This will add an additional search path to the list of existing search paths.
History
| | | | | 19 January 2009 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileClose Close an open file stream
Function prototype
BOOL Lib_FileClose( HANDLE *handle );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | | |
Return value
Purpose Close an open file stream, flushing any data to the file.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileCloseDirectory Close a directory
Function prototype
BOOL Lib_FileCloseDirectory( DIRECTORY *handle );
|
Input parameter(s)
| | | | DIRECTORY *handle | - handle to open directory | | | |
Return value
Purpose Close a directory, previously opened for enumeration.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileCreateDirectory Create a new directory
Function prototype
BOOL Lib_FileCreateDirectory( BYTE *path );
|
Input parameter(s)
| | | | BYTE *path | - ASCIIZ of directory to create | | | |
Return value
Purpose Create a new directory.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileDelete Delete a file or directory
Function prototype
BOOL Lib_FileDelete( BYTE *path );
|
Input parameter(s)
| | | | BYTE *file | - ASCIIZ of file or directory to delete | | | |
Return value
Purpose Delete a file or directory.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileDeletePath Remove a library path
Function prototype
BOOL Lib_FileDeletePath( BYTE *path );
|
Input parameter(s)
| | | | BYTE *path | - ASCIIZ of path to delete | | | |
Return value
Purpose Removes a search path from the list of existing search paths.
History
| | | | | 19 January 2009 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileEOF Get 'end-of-file' state
Function prototype
BOOL Lib_FileEOF( HANDLE *handle );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | | |
Return value
| | | | BOOL | - TRUE if at end of file, else FALSE | | | |
Purpose Returns the end-of-file state of an open file.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileGetAttributes Get file or directory attributes
Function prototype
BOOL Lib_FileGetAttributes( BYTE *path, DWORD *attributes, DWORD *size );
|
Input parameter(s)
| | | | BYTE *path | - ASCIIZ of path or directory | | DWORD *attributes | - returned attributes | | DWORD *size | - size of file or zero for a directory | | | |
Return value
Purpose Returns the attributes and size of a file or directory.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileGetDirectory Get current directory path
Function prototype
BYTE *Lib_FileGetDirectory();
|
Input parameter(s)
Return value
| | | | BYTE * | - ASCIIZ of currently selected directory | | | |
Purpose Returns the path of the currently selected directory.
History
| | | | | 19 January 2009 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileGetDrives Get bitmap of present drives
Function prototype
DWORD Lib_FileGetDrives();
|
Input parameter(s)
Return value
| | | | DWORD | - bitmap of drives present | | | |
Purpose Returns a bitmap of drives available for access.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileGetFreeSpace Get drive free space
Function prototype
DWORD Lib_FileGetFreeSpace( BYTE drive );
|
Input parameter(s)
| | | | BYTE drive | - drive number (0-25) or ASCII value (A-Z) | | | |
Return value
| | | | DWORD | - size in bytes available on drive | | | |
Purpose Returns the free space of a logical drive,
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileGetLibrary Get current library path
Function prototype
BYTE *Lib_FileGetLibrary();
|
Input parameter(s)
Return value
Purpose Function purpose description pending.
History
| | | | | 19 January 2009 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileGetPath Get current library path
Function prototype
BYTE *Lib_FileGetPath( DWORD index );
|
Input parameter(s)
| | | | DWORD index | - index (zero for first) of search path | | | |
Return value
| | | | BYTE * | - ASCIIZ of search path, or NULL if at end of list | | | |
Purpose Function purpose description pending.
History
| | | | | 19 January 2009 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileGetPosition Set position in a file
Function prototype
BOOL Lib_FileSetPosition( HANDLE *handle, DWORD position, BYTE type );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | DWORD position | - set file position | | BYTE type | - offset type | | | |
Return value
Purpose This will set the position of the file pointer with in an open file.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileGetSize Get size of a file
Function prototype
DWORD Lib_FileGetSize( HANDLE *handle );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | | |
Return value
| | | | DWORD | - size of file in bytes | | | |
Purpose Returns the size of a file.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileGetUsedSpace Get drive used space
Function prototype
DWORD Lib_FileGetUsedSpace( BYTE drive );
|
Input parameter(s)
| | | | BYTE drive | - drive number (0-25) or ASCII value (A-Z) | | | |
Return value
| | | | DWORD | - size in bytes used on drive | | | |
Purpose Returns the amount of space used of a logical drive.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileOpen Open a file for read and/or write access
Function prototype
HANDLE *Lib_FileOpen( BYTE *path, DWORD access );
|
Input parameter(s)
| | | | BYTE *path | - ASCIIZ of file to open/create | | DWORD access | - bitmap of parameters for opening file | | | |
Return value
| | | | HANDLE * | - handle to file or NULL if failed | | | |
Purpose Opens a file for read/write/create access.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileOpenDirectory Open a directory
Function prototype
DIRECTORY *Lib_FileOpenDirectory( BYTE *path );
|
Input parameter(s)
| | | | BYTE *path | - ASCIIZ path of directory to open | | | |
Return value
| | | | DIRECTORY * | - handle to directory | | | |
Purpose Open a directory for enumeration of files/directories contained with in.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileRead Read a block of data from a file
Function prototype
BOOL Lib_FileRead( HANDLE *handle, void *block, DWORD size );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | void *block | - address in memory to place data read from file | | DWORD size | - size in bytes of data to read | | | |
Return value
Purpose This will read a number of bytes from an open file.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileReadByte Read a byte from a file
Function prototype
BYTE Lib_FileReadByte( HANDLE *handle );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | | |
Return value
| | | | BYTE | - byte read from file | | | |
Purpose This will read a byte from an open file.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileReadLine Read a line from a file
Function prototype
BOOL Lib_FileReadLine( HANDLE *handle, BYTE *line, DWORD size );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | BYTE *line | - address of buffer for line | | DWORD size | - size of buffer | | | |
Return value
Purpose This will read a line of ASCII text from a file, terminating on an ASCII value less than 32 or EOF.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileSetAttributes Set file or directory attributes
Function prototype
BOOL Lib_FileSetAttributes( BYTE *path, DWORD attr );
|
Input parameter(s)
| | | | BYTE *path | - ASCIIZ path of file or directory | | DWORD attributes | - attributes to set/clear | | | |
Return value
Purpose This will set the attributes of a file or directory.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileSetDirectory Set current directory path
Function prototype
BOOL Lib_FileSetDirectory( BYTE *path );
|
Input parameter(s)
| | | | BYTE *path | - ASCIIZ of path to change current directory to | | | |
Return value
Purpose Set the current directory path.
History
| | | | | 19 January 2009 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileSetLibrary Set current library path
Function prototype
BOOL Lib_FileSetLibrary( BYTE *path );
|
Input parameter(s)
Return value
Purpose Function purpose description pending.
History
| | | | | 19 January 2009 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileWrite Write a block of data to a file
Function prototype
BOOL Lib_FileWrite( HANDLE *handle, void *block, DWORD size );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | void *block | - address in memory to place data written to file | | DWORD size | - size in bytes of data to write | | | |
Return value
Purpose This will write a block of data to a file.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileWriteByte Write a byte to a file
Function prototype
BOOL Lib_FileWriteByte( HANDLE *handle, BYTE byte );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | BYTE | - byte to write to file | | | |
Return value
Purpose This will write a byte to a file.
History
| | | | | 07 February 2006 | GJP | Created | | | | |
Click here to report an error
Back to top
Lib_FileWriteLine Write a line to a file
Function prototype
BOOL Lib_FileWriteString( HANDLE *handle, BYTE *line );
|
Input parameter(s)
| | | | HANDLE *handle | - handle of file | | | |
Return value
Purpose This will write an ASCIIZ string to a file.
History
Click here to report an error
Back to top |