SDSL  3.0.0
Succinct Data Structure Library
sdsl::ram_fs Namespace Reference

Typedefs

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

Functions

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

Typedef Documentation

◆ content_type

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

Definition at line 115 of file memory_tracking.hpp.

Function Documentation

◆ close()

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

Get fd for file.

Definition at line 110 of file ram_fs.hpp.

◆ content() [1/2]

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

Get the content with fd.

Definition at line 125 of file ram_fs.hpp.

◆ content() [2/2]

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

Get the content.

Definition at line 61 of file ram_fs.hpp.

◆ exists()

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

Check if the file exists.

Definition at line 26 of file ram_fs.hpp.

◆ file_size() [1/2]

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

Get the file size with fd.

Definition at line 146 of file ram_fs.hpp.

◆ file_size() [2/2]

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

Get the file size.

Definition at line 49 of file ram_fs.hpp.

◆ open()

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

Get fd for file.

Definition at line 88 of file ram_fs.hpp.

◆ remove()

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

Remove the file with key name

Definition at line 69 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 78 of file ram_fs.hpp.

◆ store()

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

Definition at line 33 of file ram_fs.hpp.

◆ truncate()

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

Get the content with fd.

Definition at line 134 of file ram_fs.hpp.