ZenLib::File Class Reference

File manipulation. More...

`#include <File.h>`

## Public Types

enum | access_t { Access_Read = 0 , Access_Write = 1 , Access_Read_Write = 2 , Access_Write_Append = 3 , Access_Write_Excluding = 4 }
| Options for Open method. More...
enum | move_t { FromBegin = 0 , FromCurrent = 1 , FromEnd = 2 }
| Options for Move method. More...

## Public Member Functions

| File ()
| File (ZenLib::Ztring File_Name, access_t Access=Access_Read)
| ~File ()
bool | Open (const tstring &File_Name, access_t Access=Access_Read)
bool | Create (const ZenLib::Ztring &File_Name, bool OverWrite=true)
void | Close ()
size_t | Read (int8u *Buffer, size_t Buffer_Size)
size_t | Write (const int8u *Buffer, size_t Buffer_Size)
size_t | Write (const Ztring &ToWrite)
bool | Truncate (int64u Offset=(int64u) -1)
bool | GoTo (int64s Position, move_t MoveMethod=FromBegin)
int64u | Position_Get ()
int64u | Size_Get ()
Ztring | Created_Get ()
Ztring | Created_Local_Get ()
Ztring | Modified_Get ()
Ztring | Modified_Local_Get ()
bool | Opened_Get ()

## Static Public Member Functions

static int64u | Size_Get (const Ztring &File_Name)
static Ztring | Created_Get (const Ztring &File_Name)
static Ztring | Modified_Get (const Ztring &File_Name)
static bool | Exists (const Ztring &File_Name)
static bool | Copy (const Ztring &Source, const Ztring &Destination, bool OverWrite=false)
static bool | Move (const Ztring &Source, const Ztring &Destination, bool OverWrite=false)
static bool | Delete (const Ztring &File_Name)

## Public Attributes

Ztring | File_Name
int64u | Position
int64u | Size
void * | File_Handle

## Detailed Description

File manipulation.

## Member Enumeration Documentation

## access_t

enum ZenLib::File::access_t

Options for Open method.

Enumerator
Access_Read | Read permission.
Access_Write | Write permission.
Access_Read_Write | Read and Write permissions.
Access_Write_Append | Write permission without deleting old file.
Access_Write_Excluding | Write permission preventing reading.

## move_t

enum ZenLib::File::move_t

Options for Move method.

Enumerator
FromBegin | Begin of file.
FromCurrent | Current position.
FromEnd | End of file.

## Constructor & Destructor Documentation

## File() [1/2]

ZenLib::File::File | ( |  | ) |

## File() [2/2]

ZenLib::File::File | ( | ZenLib::Ztring | File_Name,
|  | access_t | Access = Access_Read )

References Access_Read, and File_Name.

## ~File()

ZenLib::File::~File | ( |  | ) |

## Member Function Documentation

## Close()

void ZenLib::File::Close | ( |  | ) |

## Copy()

bool ZenLib::File::Copy | ( | const Ztring & | Source,
|  | const Ztring & | Destination,
|  | bool | OverWrite = false )

static

## Create()

bool ZenLib::File::Create | ( | const ZenLib::Ztring & | File_Name,
|  | bool | OverWrite = true )

References File_Name.

## Created_Get() [1/2]

Ztring ZenLib::File::Created_Get | ( |  | ) |

## Created_Get() [2/2]

Ztring ZenLib::File::Created_Get | ( | const Ztring & | File_Name | ) |

static

References File_Name.

## Created_Local_Get()

Ztring ZenLib::File::Created_Local_Get | ( |  | ) |

## Delete()

bool ZenLib::File::Delete | ( | const Ztring & | File_Name | ) |

static

References File_Name.

## Exists()

bool ZenLib::File::Exists | ( | const Ztring & | File_Name | ) |

static

References File_Name.

## GoTo()

bool ZenLib::File::GoTo | ( | int64s | Position,
|  | move_t | MoveMethod = FromBegin )

References FromBegin, and Position.

## Modified_Get() [1/2]

Ztring ZenLib::File::Modified_Get | ( |  | ) |

## Modified_Get() [2/2]

Ztring ZenLib::File::Modified_Get | ( | const Ztring & | File_Name | ) |

static

References File_Name.

## Modified_Local_Get()

Ztring ZenLib::File::Modified_Local_Get | ( |  | ) |

## Move()

bool ZenLib::File::Move | ( | const Ztring & | Source,
|  | const Ztring & | Destination,
|  | bool | OverWrite = false )

static

## Open()

bool ZenLib::File::Open | ( | const tstring & | File_Name,
|  | access_t | Access = Access_Read )

References Access_Read, and File_Name.

## Opened_Get()

bool ZenLib::File::Opened_Get | ( |  | ) |

## Position_Get()

int64u ZenLib::File::Position_Get | ( |  | ) |

## Read()

size_t ZenLib::File::Read | ( | int8u * | Buffer,
|  | size_t | Buffer_Size )

## Size_Get() [1/2]

int64u ZenLib::File::Size_Get | ( |  | ) |

## Size_Get() [2/2]

int64u ZenLib::File::Size_Get | ( | const Ztring & | File_Name | ) |

static

References File_Name.

## Truncate()

bool ZenLib::File::Truncate | ( | int64u | Offset = (int64u) -1 | ) |

## Write() [1/2]

size_t ZenLib::File::Write | ( | const int8u * | Buffer,
|  | size_t | Buffer_Size )

## Write() [2/2]

size_t ZenLib::File::Write | ( | const Ztring & | ToWrite | ) |

## Member Data Documentation

## File_Handle

void* ZenLib::File::File_Handle

## File_Name

Ztring ZenLib::File::File_Name

Referenced by Create(), Created_Get(), Delete(), Exists(), File(), Modified_Get(), Open(), and Size_Get().

## Position

int64u ZenLib::File::Position

Referenced by GoTo().

## Size

int64u ZenLib::File::Size

The documentation for this class was generated from the following file:

- File.h