adtf_file_library
0.13.2
|
Namespaces | |
exceptions | |
namespace to collect special exceptions for file operations. | |
Classes | |
class | File |
class | FileRingBuffer |
Typedefs | |
using | FilePos = int64_t |
Type for a file position. | |
using | FileSize = FilePos |
Type for the file size. | |
typedef int | FileHandle |
The type FileHandle is used internally only. | |
Functions | |
a_util::datetime::DateTime | getTimeAccess (const a_util::filesystem::Path filename) |
This function returns the last access time of the file. More... | |
a_util::datetime::DateTime | getTimeCreation (const a_util::filesystem::Path filename) |
This function returns the creation time of the file. More... | |
a_util::datetime::DateTime | getTimeChange (const a_util::filesystem::Path filename) |
This function returns the last change (write) time of the file. More... | |
size_t | getDefaultSectorSize () noexcept |
Get the Default Sector Size. More... | |
void * | allocPageAlignedMemory (size_t size, size_t page_size) |
allocates a memory buffer for the size of size (in bytes), page aligned in size to page_size More... | |
void | freePageAlignedMemory (void *memory) |
frees the memory buffer allocated with utils5ext::allocPageAlignedMemory More... | |
size_t | getSectorSizeFor (const a_util::filesystem::Path &filename) noexcept |
Get the sector size of a file within windows file system. More... | |
void | memZero (void *data, size_t bytes) |
Helper function to set a memory buffer to zero. More... | |
void | fileRename (const a_util::filesystem::Path &from, const a_util::filesystem::Path &to) |
Renames or moves a file. More... | |
Namespace for Utils5 Extension utilities.
The Utils5 Extension package will provide some further helper classes needed to create an indexed file (ifhd).
void* utils5ext::allocPageAlignedMemory | ( | size_t | size, |
size_t | page_size | ||
) |
allocates a memory buffer for the size of size
(in bytes), page aligned in size to page_size
size | the size in bytes to allocate and to use |
page_size | the page size the buffer will be aligned to in size |
void utils5ext::fileRename | ( | const a_util::filesystem::Path & | from, |
const a_util::filesystem::Path & | to | ||
) |
Renames or moves a file.
from | the file to rename or move |
to | the destination file |
exceptions::ErrorFileAccess |
void utils5ext::freePageAlignedMemory | ( | void * | memory | ) |
frees the memory buffer allocated with utils5ext::allocPageAlignedMemory
memory | the memory buffer |
|
noexcept |
Get the Default Sector Size.
|
noexcept |
Get the sector size of a file within windows file system.
filename | the filename to retrieve the sector size from |
a_util::datetime::DateTime utils5ext::getTimeAccess | ( | const a_util::filesystem::Path | filename | ) |
This function returns the last access time of the file.
filename | Filename of the file to be checked |
exceptions::ErrorFileAccess,throw | std::runtime_error |
a_util::datetime::DateTime utils5ext::getTimeChange | ( | const a_util::filesystem::Path | filename | ) |
This function returns the last change (write) time of the file.
filename | Filename of the file to be checked |
exceptions::ErrorFileAccess,throw | std::runtime_error |
a_util::datetime::DateTime utils5ext::getTimeCreation | ( | const a_util::filesystem::Path | filename | ) |
This function returns the creation time of the file.
filename | Filename of the file to be checked |
exceptions::ErrorFileAccess,throw | std::runtime_error |
|
inline |
Helper function to set a memory buffer to zero.
data | the buffer |
bytes | the buffer size in bytes. |