AcquireFileLock • AcquireFileInfo • DestroyFile • DestroyFileInfo • GetFileDescriptor • GetFilePath • GetFileproperties • ReadFileByte • ReadFileChunk • ReadFile16Bits • ReadFile32Bits • ReadFile64Bits • RelinquishFileLock • WriteFileChunk • WriteFile16Bits • WriteFile32Bits • WriteFile64Bits
AcquireFileLock
AcquireFileLock() acquires a lock for a file.
The format of the AcquireFileLock method is:
WizardBooleanType AcquireFileLock(FileInfo *file_info, ExceptionInfo *exception)
A description of each parameter follows:
- file_info
- The file info.
- exception
- Return any errors or warnings in this structure.
AcquireFileInfo
AcquireFileInfo() opens the file for reading or writing and returns a FileInfo structure.
The format of the AcquireFileInfo method is:
FileInfo *AcquireFileInfo(const char *path,const char *relative_path, const FileMode mode,ExceptionInfo *exception)
A description of each parameter follows:
- path
- The file path.
- relative_path
- The path relative to the default path.
- mode
- The file I/O mode.
- exception
- Return any errors or warnings in this structure.
DestroyFile
DestroyFile() destroys the file on disk.
The format of the DestroyFile method is:
WizardBooleanType DestroyFile(FileInfo *file_info, Exceptioninfo *exception)
A description of each parameter follows:
- file_info
- The file info.
- exception
- Return any errors or warnings in this structure.
DestroyFileInfo
DestroyFileInfo() destroys the file info structure.
The format of the DestroyFileInfo method is:
FileInfo *DestroyFileInfo(FileInfo *file_info)
A description of each parameter follows:
- path
- The file name.
GetFileDescriptor
GetFileDescriptor() returns the file descriptor.
The format of the GetFileDescriptor method is:
int GetFileDescriptor(const FileInfo *file_info)
A description of each parameter follows:
- file_info
- The file info.
GetFilePath
GetFilePath() returns the file path.
The format of the GetFilePath method is:
const const char *GetFilePath(const FileInfo *file_info)
A description of each parameter follows:
- file_info
- The file info.
GetFileproperties
GetFileproperties() returns the file properties.
The format of the GetFileProperties method is:
const struct stat *GetFileProperties(const FileInfo *file_info)
A description of each parameter follows:
- file_info
- The file info.
ReadFileByte
ReadFileByte() returns the character read as an unsigned char cast to an integer or EOF on end of file or error.
The format of the ReadFileByte method is:
int ReadFileByte(FileInfo *file_info)
A description of each parameter follows.
the blob info.
ReadFileChunk
ReadFileChunk() reliably reads a chunk of data from a file. It returns WizardTrue if all the data requested is read otherwise WizardFalse.
The format of the ReadFileChunk method is:
WizardBooleanType ReadFileChunk(FileInfo *file_info,const void *data, const size_t length)
A description of each parameter follows:
- file_info
- The file info.
- data
- The data.
- length
- The data length in bytes.
ReadFile16Bits
ReadFile16Bits() reads a 16-bit quantity in least-significant byte first order and returns it.
The format of the ReadFile16Bits method is:
WizardBooleanType ReadFile16Bits(FileInfo *file_info, unsigned short *value)
A description of each parameter follows.
The image.
The value.
ReadFile32Bits
ReadFile32Bits() reads a 32-bit quantity in least-significant byte first order and returns it.
The format of the ReadFile32Bits method is:
WizardBooleanType ReadFile32Bits(FileInfo *file_info, size_t *value)
A description of each parameter follows.
The image.
The value.
ReadFile64Bits
ReadFile64Bits() reads a 64-bit quantity in least-significant byte first order and returns it.
The format of the ReadFile64Bits method is:
WizardBooleanType ReadFile64Bits(FileInfo *file_info, WizardSizeType *value)
A description of each parameter follows.
The image.
The value.
RelinquishFileLock
RelinquishFileLock() relinquishes a file lock.
The format of the RelinquishFileLock method is:
WizardBooleanType RelinquishFileLock(FileInfo *file_info, ExceptionInfo *exception)
A description of each parameter follows:
- file_info
- The file info.
- exception
- Return any errors or warnings in this structure.
WriteFileChunk
WriteFileChunk() reliably writes data to a file.
The format of the WriteFileChunk method is:
WizardBooleanType WriteFileChunk(FileInfo *file_info,const void *data, const size_t length)
A description of each parameter follows:
- file_info
- The file info.
- data
- The data.
- lenth
- The data length in bytes.
WriteFile16Bits
WriteFile16Bits() writes a ssize_t value as a 16-bit quantity in least-significant byte first order.
The format of the WriteFile16Bits method is:
WizardBooleanType WriteFile16Bits(FileInfo *file_info, const unsigned short value)
A description of each parameter follows.
Specifies the value to write.
The image.
WriteFile32Bits
WriteFile32Bits() writes a ssize_t value as a 32-bit quantity in least-significant byte first order.
The format of the WriteFile32Bits method is:
WizardBooleanType WriteFile32Bits(FileInfo *file_info, const size_t value)
A description of each parameter follows.
Specifies the value to write.
The image.
WriteFile64Bits
WriteFile64Bits() writes a ssize_t value as a 64-bit quantity in least-significant byte first order.
The format of the WriteFile64Bits method is:
WizardBooleanType WriteFile64Bits(FileInfo *file_info, const WizardSizeType value)
A description of each parameter follows.
Specifies the value to write.
The image.