SDSL 3.0.2
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::ram_fs Namespace Reference

Typedefs

typedef std::vector< char, track_allocator< char > > content_type
 

Functions

bool exists (std::string const &name)
 Check if the file exists.
 
void store (std::string const &name, content_type data)
 
size_t file_size (std::string const &name)
 Get the file size.
 
content_typecontent (std::string const &name)
 Get the content.
 
int remove (std::string const &name)
 Remove the file with key name
 
int rename (const std::string old_filename, const std::string new_filename)
 Rename the file. Change key old_filename into new_filename.
 
int open (std::string const &name)
 Get fd for file.
 
int close (int const fd)
 Get fd for file.
 
content_typecontent (int const fd)
 Get the content with fd.
 
int truncate (int const fd, size_t new_size)
 Get the content with fd.
 
size_t file_size (int const fd)
 Get the file size with fd.
 

Typedef Documentation

◆ content_type

typedef std::vector<char, track_allocator<char> > sdsl::ram_fs::content_type

Definition at line 117 of file memory_tracking.hpp.

Function Documentation

◆ close()

int sdsl::ram_fs::close ( int const  fd)
inline

Get fd for file.

Definition at line 122 of file ram_fs.hpp.

◆ content() [1/2]

content_type & sdsl::ram_fs::content ( int const  fd)
inline

Get the content with fd.

Definition at line 141 of file ram_fs.hpp.

◆ content() [2/2]

content_type & sdsl::ram_fs::content ( std::string const &  name)
inline

Get the content.

Definition at line 67 of file ram_fs.hpp.

◆ exists()

bool sdsl::ram_fs::exists ( std::string const &  name)
inline

Check if the file exists.

Definition at line 29 of file ram_fs.hpp.

◆ file_size() [1/2]

size_t sdsl::ram_fs::file_size ( int const  fd)
inline

Get the file size with fd.

Definition at line 163 of file ram_fs.hpp.

◆ file_size() [2/2]

size_t sdsl::ram_fs::file_size ( std::string const &  name)
inline

Get the file size.

Definition at line 52 of file ram_fs.hpp.

◆ open()

int sdsl::ram_fs::open ( std::string const &  name)
inline

Get fd for file.

Definition at line 97 of file ram_fs.hpp.

◆ remove()

int sdsl::ram_fs::remove ( std::string const &  name)
inline

Remove the file with key name

Definition at line 75 of file ram_fs.hpp.

◆ rename()

int sdsl::ram_fs::rename ( const std::string  old_filename,
const std::string  new_filename 
)
inline

Rename the file. Change key old_filename into new_filename.

Definition at line 87 of file ram_fs.hpp.

◆ store()

void sdsl::ram_fs::store ( std::string const &  name,
content_type  data 
)
inline

Definition at line 36 of file ram_fs.hpp.

◆ truncate()

int sdsl::ram_fs::truncate ( int const  fd,
size_t  new_size 
)
inline

Get the content with fd.

Definition at line 150 of file ram_fs.hpp.