FVS Fingerprint Verification System API Documentation

file.h File Reference

#include "fvstypes.h"

Go to the source code of this file.

Typedefs

typedef FvsHandle_t FvsFile_t
typedef enum FvsFileOptions_t FvsFileOptions_t

Enumerations

enum  FvsFileOptions_t { FvsFileRead = (1<<1), FvsFileWrite = (1<<2), FvsFileCreate = (1<<3) }

Functions

FvsFile_t FileCreate (void)
void FileDestroy (FvsFile_t file)
FvsError_t FileOpen (FvsFile_t file, const FvsString_t name, const FvsFileOptions_t flags)
FvsError_t FileClose (FvsFile_t file)
FvsUint_t FileRead (FvsFile_t file, FvsPointer_t data, const FvsUint_t length)
FvsUint_t FileWrite (FvsFile_t file, const FvsPointer_t data, const FvsUint_t length)
FvsByte_t FileGetByte (FvsFile_t file)
FvsWord_t FileGetWord (FvsFile_t file)
FvsBool_t FileIsOpen (const FvsFile_t file)
FvsBool_t FileIsAtEOF (const FvsFile_t file)
FvsError_t FileCommit (FvsFile_t file)
FvsError_t FileSeekToBegin (FvsFile_t file)
FvsError_t FileSeekToEnd (FvsFile_t file)
FvsError_t FileSeek (FvsFile_t file, const FvsUint_t position)
FvsUint_t FileGetPosition (FvsFile_t file)


Typedef Documentation

typedef FvsHandle_t FvsFile_t
 

The implementation of the object is private and must not be known by the user. Use this handle to manipulate the file through the functions provided hereunder.

typedef enum FvsFileOptions_t FvsFileOptions_t
 

File options that can be used with the FileOpen function.


Enumeration Type Documentation

enum FvsFileOptions_t
 

File options that can be used with the FileOpen function.

Enumeration values:
FvsFileRead  Open for reading
FvsFileWrite  Open for writing
FvsFileCreate  Create if the file does not exist


Function Documentation

FvsFile_t FileCreate void   
 

Create a new file object. Only after having being created, can the file object be used by the other functions.

Returns:
NULL if allocation failed, otherwise a new object handle.

void FileDestroy FvsFile_t    file
 

Destroy an existing file object. After having been destructed, the file object cannot be used anymore.

Parameters:
file a pointer to a file object to delete
Returns:
nothing

FvsError_t FileOpen FvsFile_t    file,
const FvsString_t    name,
const FvsFileOptions_t    flags
 

Open a file. A file can be opened for reading (it must then exist). It can also be opened for writing and an empty file may be created. Read and Write operations can only be performed on open files.

Parameters:
file a file object
name name of the file to open
flags open flags
Returns:
an error code

FvsError_t FileClose FvsFile_t    file
 

Close an open file. After having been closed, the file operations cannot be used anymore.

Parameters:
file a file object
Returns:
an error code

FvsUint_t FileRead FvsFile_t    file,
FvsPointer_t    data,
const FvsUint_t    length
 

Read data from the file. The amount of bytes to be read is specified by length. The data read will be stored into the location pointed by data.

Parameters:
file a file object
data pointer to an array where the data will be stored
length number of bytes to read from the file
Returns:
the number of bytes read

FvsUint_t FileWrite FvsFile_t    file,
const FvsPointer_t    data,
const FvsUint_t    length
 

Write data to the file. The amount of data to be written is specified by length. The data to write is stored into the location pointed to by data.

Parameters:
file a file object
data pointer to an array where the data is stored
length number of bytes to write to the file
Returns:
the number of bytes written

FvsByte_t FileGetByte FvsFile_t    file
 

Get a byte from the file.

Parameters:
file a file object
Returns:
the byte read

FvsWord_t FileGetWord FvsFile_t    file
 

Get a word from the file.

Parameters:
file a file object
Returns:
the word read

FvsBool_t FileIsOpen const FvsFile_t    file
 

Test if a file is open.

Parameters:
file a file object
Returns:
a boolean value true when the file is open

FvsBool_t FileIsAtEOF const FvsFile_t    file
 

Test if the file pointer is currently at the end of the file.

Parameters:
file a file object
Returns:
a boolean value true when EOF is reached

FvsError_t FileCommit FvsFile_t    file
 

Commit the changes made to the file.

Parameters:
file a file object
Returns:
an error code

FvsError_t FileSeekToBegin FvsFile_t    file
 

Seek to the begin of the file.

Parameters:
file a file object
Returns:
an error code

FvsError_t FileSeekToEnd FvsFile_t    file
 

Seek to the end of the file.

Parameters:
file a file object
Returns:
an error code

FvsError_t FileSeek FvsFile_t    file,
const FvsUint_t    position
 

Seek to a given position.

Parameters:
file a file object
position the new file pointer position from beginning of the file
Returns:
an error code

FvsUint_t FileGetPosition FvsFile_t    file
 

Get the current position in the file.

Parameters:
file a file object
Returns:
the current position


Generated on Sat May 31 20:07:30 2003 for FVS Fingerprint Verification System by doxygen 1.3-rc3 Jaap de Haan (BinaryMan)