Graphite  Version 3
An experimental 3D geometry processing program
file_system.h File Reference

Functions and times for filesystem manipulation. More...

#include <geogram/basic/common.h>
#include <geogram/basic/numeric.h>
#include <geogram/basic/counted.h>
#include <geogram/basic/smart_pointer.h>
#include <string>
#include <vector>
#include <map>

Go to the source code of this file.

Classes

class  GEO::FileSystem::Node
 A Node in a FileSystem. More...
 
class  GEO::FileSystem::MemoryNode
 Implementation of a file system stored in memory. More...
 

Namespaces

 GEO
 Global Vorpaline namespace.
 
 GEO::FileSystem
 Abstraction layer for file-system management.
 

Typedefs

typedef SmartPointer< Node > GEO::FileSystem::Node_var
 

Functions

void GEO::FileSystem::initialize ()
 Initializes the FileSystem library. More...
 
void GEO::FileSystem::terminate ()
 Terminates the FileSystem library. More...
 
bool GEO::FileSystem::is_file (const std::string &path)
 Checks if a path is a regular file. More...
 
bool GEO::FileSystem::is_directory (const std::string &path)
 Checks if a path is a directory. More...
 
bool GEO::FileSystem::can_read_directory (const std::string &path)
 Tests whether one can read files from a directory. More...
 
bool GEO::FileSystem::can_write_directory (const std::string &path, bool create_missing_directories=false)
 Tests whether a directory can be written to. More...
 
bool GEO::FileSystem::create_directory (const std::string &path)
 Creates a directory. More...
 
bool GEO::FileSystem::delete_directory (const std::string &path)
 Deletes a directory. More...
 
bool GEO::FileSystem::delete_file (const std::string &path)
 Deletes a file. More...
 
bool GEO::FileSystem::get_directory_entries (const std::string &path, std::vector< std::string > &result)
 Lists directory contents. More...
 
std::string GEO::FileSystem::get_current_working_directory ()
 Gets the current working directory. More...
 
bool GEO::FileSystem::set_current_working_directory (const std::string &path)
 
bool GEO::FileSystem::rename_file (const std::string &old_name, const std::string &new_name)
 Renames or moves a file. More...
 
Numeric::uint64 GEO::FileSystem::get_time_stamp (const std::string &path)
 Gets a file last modification time. More...
 
std::string GEO::FileSystem::extension (const std::string &path)
 Gets a path extension. More...
 
std::string GEO::FileSystem::base_name (const std::string &path, bool remove_extension=true)
 Gets a path base name. More...
 
std::string GEO::FileSystem::dir_name (const std::string &path)
 Gets a path directory. More...
 
void GEO::FileSystem::get_directory_entries (const std::string &path, std::vector< std::string > &result, bool recursive)
 Lists directory contents. More...
 
void GEO::FileSystem::get_files (const std::string &path, std::vector< std::string > &result, bool recursive=false)
 Lists files in a directory. More...
 
void GEO::FileSystem::get_subdirectories (const std::string &path, std::vector< std::string > &result, bool recursive=false)
 Lists sub-directories in a directory. More...
 
void GEO::FileSystem::flip_slashes (std::string &path)
 Converts a path to Unix format. More...
 
bool GEO::FileSystem::copy_file (const std::string &from, const std::string &to)
 Copies a file. More...
 
bool GEO::FileSystem::set_executable_flag (const std::string &filename)
 Marks a filename as executable. More...
 
bool GEO::FileSystem::touch (const std::string &filename)
 Modifies the last modification time of a file. More...
 
std::string GEO::FileSystem::normalized_path (const std::string &path)
 Normalizes a path. More...
 
std::string GEO::FileSystem::absolute_path (const std::string &path)
 
std::string GEO::FileSystem::home_directory ()
 Gets the current user's home directory. More...
 
std::string GEO::FileSystem::documents_directory ()
 Gets the current user's home directory. More...
 
void GEO::FileSystem::get_root (Node *&root)
 Gets the root of the file system. More...
 

Detailed Description

Functions and times for filesystem manipulation.

Definition in file file_system.h.