Grow the file with the specified descriptor to the size of at least the specified size bytes. Return 0 on success, and a non‐zero value otherwise. If the optionally specified reserveFlag is true, make sure the space on disk is preallocated and not allocated on demand, preventing a possible out‐of‐disk‐space error when accessing the data on file systems with sparse file support. Preallocation is done by writing unspecified data to file in blocks of the optionally specified increment or a default value if increment is zero or unspecified. Note that if the size of the file is greater than or equal to size, this function has no effect. Also note that the contents of the newly grown portion of the file is undefined.
Synopsis
Declared in <bdls_filesystemutil.h>
static
int
growFile(
FileDescriptor descriptor,
Offset size,
bool reserveFlag = false,
std::size_t increment = k_DEFAULT_FILE_GROWTH_INCREMENT);
Created with MrDocs