Typedefs | Enumerations | Functions

# file.h File Reference

`#include "wizard/exception.h"`

Go to the source code of this file.

## Typedefs

typedef struct _FileInfo | FileInfo

## Enumerations

enum | FileMode { ReadFileMode, WriteFileMode }

## Functions

WizardExport const char * | GetFilePath (const FileInfo *)
WizardExport struct stat * | GetFileProperties (const FileInfo *)
WizardExport FileInfo * | AcquireFileInfo (const char *, const char *, const FileMode mode, ExceptionInfo *)
WizardExport FileInfo ** | DestroyFileInfo (FileInfo *, ExceptionInfo *)
WizardExport int | GetFileDescriptor (const FileInfo *)
WizardExport int | ReadFileByte (FileInfo *)
WizardExport WizardBooleanType | DestroyFile (FileInfo *, ExceptionInfo *)
WizardExport WizardBooleanType | ReadFile16Bits (FileInfo *, unsigned short *)
WizardExport WizardBooleanType | ReadFile32Bits (FileInfo *, size_t *)
WizardExport WizardBooleanType | ReadFile64Bits (FileInfo *, WizardSizeType *)
WizardExport WizardBooleanType | ReadFileChunk (FileInfo *, void *, const size_t)
WizardExport WizardBooleanType | WriteFileChunk (FileInfo *, const void *, const size_t)
WizardExport WizardBooleanType | WriteFile16Bits (FileInfo *, const unsigned short)
WizardExport WizardBooleanType | WriteFile32Bits (FileInfo *, const size_t)
WizardExport WizardBooleanType | WriteFile64Bits (FileInfo *, const WizardSizeType)

## Typedef Documentation

typedef struct _FileInfo FileInfo

## Enumeration Type Documentation

enum FileMode

Enumerator:

  ReadFileMode |
  WriteFileMode |

## Function Documentation

WizardExport FileInfo* AcquireFileInfo | ( | const char * | ,
|  | const char * | ,
|  | const FileMode | mode,
|  | ExceptionInfo * |  |
| ) |  |  |

WizardExport WizardBooleanType DestroyFile | ( | FileInfo * | ,
|  | ExceptionInfo * |  |
| ) |  |  |

WizardExport FileInfo* * DestroyFileInfo | ( | FileInfo * | ,
|  | ExceptionInfo * |  |
| ) |  |  |

References close, DestroySemaphoreInfo(), DestroyString(), _FileInfo::file, GetWizardModule, LockSemaphoreInfo(), LogWizardEvent(), _FileInfo::path, RelinquishFileLock(), RelinquishWizardMemory(), _FileInfo::semaphore, _FileInfo::signature, ThrowWizardException(), TraceEvent, UnlockSemaphoreInfo(), and WizardSignature.

Referenced by AcquireFileInfo(), ExportKeyringKey(), GetEntropyFromReservoir(), ImportKeyringKey(), PrintKeyringProperties(), and SaveEntropyToReservoir().

WizardExport int GetFileDescriptor | ( | const FileInfo * |  | ) |

WizardExport const char* GetFilePath | ( | const FileInfo * |  | ) |

References GetWizardModule, LogWizardEvent(), _FileInfo::path, _FileInfo::signature, TraceEvent, and WizardSignature.

Referenced by ExportKeyringKey(), GetEntropyFromReservoir(), ImportKeyringKey(), PrintKeyringProperties(), and SaveEntropyToReservoir().

WizardExport struct stat* GetFileProperties | ( | const FileInfo * |  | ) | `[read]`

References GetWizardModule, LogWizardEvent(), _FileInfo::properties, _FileInfo::signature, TraceEvent, and WizardSignature.

Referenced by PrintKeyringProperties().

WizardExport WizardBooleanType ReadFile16Bits | ( | FileInfo * | ,
|  | unsigned short * |  |
| ) |  |  |

WizardExport WizardBooleanType ReadFile32Bits | ( | FileInfo * | ,
|  | size_t * |  |
| ) |  |  |

WizardExport WizardBooleanType ReadFile64Bits | ( | FileInfo * | ,
|  | WizardSizeType * |  |
| ) |  |  |

WizardExport int ReadFileByte | ( | FileInfo * |  | ) |

References ReadFileChunk(), _FileInfo::signature, WizardFalse, and WizardSignature.

WizardExport WizardBooleanType ReadFileChunk | ( | FileInfo * | ,
|  | void * | ,
|  | const | size_t |
| ) |  |  |

WizardExport WizardBooleanType WriteFile16Bits | ( | FileInfo * | ,
|  | const unsigned short |  |
| ) |  |  |

WizardExport WizardBooleanType WriteFile32Bits | ( | FileInfo * | ,
|  | const | size_t |
| ) |  |  |

WizardExport WizardBooleanType WriteFile64Bits | ( | FileInfo * | ,
|  | const | WizardSizeType |
| ) |  |  |

References GetWizardModule, LogWizardEvent(), TraceEvent, and WriteFileChunk().

Referenced by ImportKeyringKey(), and SaveEntropyToReservoir().

WizardExport WizardBooleanType WriteFileChunk | ( | FileInfo * | ,
|  | const void * | ,
|  | const | size_t |
| ) |  |  |