AFIO  v2.00 late alpha
file_handle.hpp File Reference

Provides file_handle. More...

#include "io_handle.hpp"
#include "path_discovery.hpp"
#include "utils.hpp"

Classes

class  afio_v2_xxx::file_handle
 A handle to a regular file or device, kept data layout compatible with async_file_handle. More...
 
struct  afio_v2_xxx::construct< file_handle >
 Constructor for file_handle More...
 

Namespaces

 afio_v2_xxx
 The AFIO namespace.
 

Functions

void afio_v2_xxx::swap (file_handle &self, file_handle &o) noexcept
 Swap with another instance.
 
result< file_handle > afio_v2_xxx::file (const path_handle &base, file_handle::path_view_type _path, file_handle::mode _mode=file_handle::mode::read, file_handle::creation _creation=file_handle::creation::open_existing, file_handle::caching _caching=file_handle::caching::all, file_handle::flag flags=file_handle::flag::none) noexcept
 
result< file_handle > afio_v2_xxx::random_file (const path_handle &dirpath, file_handle::mode _mode=file_handle::mode::write, file_handle::caching _caching=file_handle::caching::temporary, file_handle::flag flags=file_handle::flag::none) noexcept
 
result< file_handle > afio_v2_xxx::temp_file (file_handle::path_view_type name=file_handle::path_view_type(), file_handle::mode _mode=file_handle::mode::write, file_handle::creation _creation=file_handle::creation::if_needed, file_handle::caching _caching=file_handle::caching::temporary, file_handle::flag flags=file_handle::flag::unlink_on_close) noexcept
 
result< file_handle > afio_v2_xxx::temp_inode (const path_handle &dir=path_discovery::storage_backed_temporary_files_directory(), file_handle::mode _mode=file_handle::mode::write, file_handle::flag flags=file_handle::flag::none) noexcept
 
result< file_handle::extent_type > afio_v2_xxx::length (const file_handle &self) noexcept
 
result< file_handle::extent_type > afio_v2_xxx::truncate (file_handle &self, file_handle::extent_type newsize) noexcept
 
result< std::vector< std::pair< file_handle::extent_type, file_handle::extent_type > > > afio_v2_xxx::extents (const file_handle &self) noexcept
 Returns a list of currently valid extents for this open file. WARNING: racy!
 
result< file_handle::extent_type > afio_v2_xxx::zero (file_handle &self, file_handle::extent_type offset, file_handle::extent_type bytes, deadline d=deadline()) noexcept
 Efficiently zero, and possibly deallocate, data on storage. More...
 

Detailed Description

Provides file_handle.