A class for handling system files and paths using UTF-8 strings.  
 More...
#include <FileSystem.h>
 | 
| static std::string  | absolutePath (const std::string &path) | 
|   | Retrives the absolute path for the given path in UTF-8.  More...
  | 
|   | 
| static void  | copyFile (const std::string &from, const std::string &to) | 
|   | Copies a file.  More...
  | 
|   | 
| static bool  | createDirectories (const std::string &path) | 
|   | Creates a directory for any element of path that does not exist.  More...
  | 
|   | 
| static bool  | createDirectory (const std::string &path) | 
|   | Creates a directory from a given path in UTF-8.  More...
  | 
|   | 
| static std::string  | currentPath () | 
|   | Retrives the current working directory path in UTF-8.  More...
  | 
|   | 
| static std::string  | executableDirectory () | 
|   | 
| static bool  | exists (const std::string &path) | 
|   | Checks if a given path in UTF-8 exists.  More...
  | 
|   | 
| static std::string  | extension (const std::string &path) | 
|   | Retrives the extension of a given file path in UTF-8.  More...
  | 
|   | 
| static bool  | isDirectory (const std::string &path) | 
|   | Checks if a given path in UTF-8 is a directory.  More...
  | 
|   | 
| static bool  | isEmpty (const std::string &path) | 
|   | Checks if a given path in UTF-8 is an empty directory.  More...
  | 
|   | 
| static bool  | isRegularFile (const std::string &path) | 
|   | Checks if a given path in UTF-8 is a regular file.  More...
  | 
|   | 
| static std::vector< std::string >  | listDirectory (const std::string &path) | 
|   | Lists a directory from a given path in UTF-8.  More...
  | 
|   | 
| static bool  | remove (const std::string &path) | 
|   | Removes a file or directory from a given path in UTF-8.  More...
  | 
|   | 
| static void  | rename (const std::string &old_p, const std::string &new_p) | 
|   | Renames a file or directory from a given path in UTF-8.  More...
  | 
|   | 
| static std::string  | systemCompletePath (const std::string &path) | 
|   | Composes an absolute path for the given path in UTF-8.  More...
  | 
|   | 
| static std::string  | tempDirectoryPath () | 
|   | Retrives the temp directory in UTF-8.  More...
  | 
|   | 
| static std::string  | uniquePath (const std::string &format="%%%%-%%%%-%%%%-%%%%") | 
|   | Retrives an unique path generated by a given format.  More...
  | 
|   | 
A class for handling system files and paths using UTF-8 strings. 
Definition at line 49 of file FileSystem.h.
 
  
  
      
        
          | te::core::FileSystem::FileSystem  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | te::core::FileSystem::~FileSystem  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | te::core::FileSystem::FileSystem  | 
          ( | 
          FileSystem const &  | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | static std::string te::core::FileSystem::absolutePath  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Retrives the absolute path for the given path in UTF-8. 
- Parameters
 - 
  
  
 
- Returns
 - String in UTF-8 for the absolute path. 
 
 
 
  
  
      
        
          | static void te::core::FileSystem::copyFile  | 
          ( | 
          const std::string &  | 
          from,  | 
         
        
           | 
           | 
          const std::string &  | 
          to  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Copies a file. 
- Parameters
 - 
  
    | from | Path in UTF-8 for the file to be copied.  | 
    | to | Path in UTF-8 for the copy output.  | 
  
   
 
 
  
  
      
        
          | static bool te::core::FileSystem::createDirectories  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Creates a directory for any element of path that does not exist. 
- Parameters
 - 
  
  
 
- Returns
 - true if a new directory was created, otherwise false. 
 
 
 
  
  
      
        
          | static bool te::core::FileSystem::createDirectory  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Creates a directory from a given path in UTF-8. 
- Parameters
 - 
  
  
 
- Returns
 - true if a new directory was created, otherwise false. 
 
 
 
  
  
      
        
          | static std::string te::core::FileSystem::currentPath  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Retrives the current working directory path in UTF-8. 
- Returns
 - String in UTF-8 for the current working directory path. 
 
 
 
  
  
      
        
          | static std::string te::core::FileSystem::executableDirectory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
  
  
      
        
          | static bool te::core::FileSystem::exists  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Checks if a given path in UTF-8 exists. 
- Parameters
 - 
  
  
 
- Returns
 - true if exists, otherwise false. 
 
 
 
  
  
      
        
          | static std::string te::core::FileSystem::extension  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Retrives the extension of a given file path in UTF-8. 
- Parameters
 - 
  
  
 
- Returns
 - String in UTF-8 for the extension. 
 
 
 
  
  
      
        
          | static bool te::core::FileSystem::isDirectory  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Checks if a given path in UTF-8 is a directory. 
- Parameters
 - 
  
  
 
- Returns
 - true if is a directory, otherwise false. 
 
 
 
  
  
      
        
          | static bool te::core::FileSystem::isEmpty  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Checks if a given path in UTF-8 is an empty directory. 
- Parameters
 - 
  
  
 
- Returns
 - true if is a empty directory, otherwise false. 
 
 
 
  
  
      
        
          | static bool te::core::FileSystem::isRegularFile  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
  
  
      
        
          | static std::vector<std::string> te::core::FileSystem::listDirectory  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Lists a directory from a given path in UTF-8. 
- Parameters
 - 
  
  
 
- Returns
 - Vector of strings in UTF-8 for directory content. 
 
 
 
  
  
      
        
          | static bool te::core::FileSystem::remove  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Removes a file or directory from a given path in UTF-8. 
- Note
 - This function will not remove if the directory is not empty.
 
- Parameters
 - 
  
  
 
- Returns
 - false if path did not exist in the first place, otherwise true. 
 
Referenced by te::common::ApplicationSettings::update().
 
 
  
  
      
        
          | static void te::core::FileSystem::rename  | 
          ( | 
          const std::string &  | 
          old_p,  | 
         
        
           | 
           | 
          const std::string &  | 
          new_p  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Renames a file or directory from a given path in UTF-8. 
- Parameters
 - 
  
    | old_p | Old name in UTF-8.  | 
    | new_p | New name in UTF-8.  | 
  
   
 
 
  
  
      
        
          | static std::string te::core::FileSystem::systemCompletePath  | 
          ( | 
          const std::string &  | 
          path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Composes an absolute path for the given path in UTF-8. 
- Parameters
 - 
  
  
 
- Returns
 - String in UTF-8 for the composed path. 
 
 
 
  
  
      
        
          | static std::string te::core::FileSystem::tempDirectoryPath  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Retrives the temp directory in UTF-8. 
- Returns
 - String in UTF-8 for temp directory. 
 
 
 
  
  
      
        
          | static std::string te::core::FileSystem::uniquePath  | 
          ( | 
          const std::string &  | 
          format = "%%%%-%%%%-%%%%-%%%%" | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/core/filesystem/FileSystem.h