Filesystem utility class with static methods.  
 More...
#include <Filesystem.h>
 | 
| static bool  | Exists (const fs::path &path) | 
|   | Check if path exists.  
  | 
|   | 
| static bool  | IsDirectory (const fs::path &path) | 
|   | Check if path is a directory.  
  | 
|   | 
| static bool  | IsFile (const fs::path &path) | 
|   | Check if path is a file.  
  | 
|   | 
| static bool  | MakeDirectory (const fs::path &path) | 
|   | Create directory.  
  | 
|   | 
| static bool  | DeleteDirectory (const fs::path &path) | 
|   | Delete directory.  
  | 
|   | 
| static fs::path  | GetCurrentWorkingDirectory () | 
|   | Get current working directory.  
  | 
|   | 
| static String  | GetFilename (const fs::path &path, bool includeExtension=true) | 
|   | Get filename.  
  | 
|   | 
| static String  | GetFileExtension (const fs::path &path) | 
|   | Get file extension.  
  | 
|   | 
| static U32Max  | GetFileSize (const fs::path &path) | 
|   | Get file size.  
  | 
|   | 
| static std::vector< Byte >  | ReadFileAsBytes (const fs::path &path) | 
|   | Read file as bytes.  
  | 
|   | 
| static String  | ReadFileAsString (const fs::path &path) | 
|   | Read file as string.  
  | 
|   | 
Filesystem utility class with static methods. 
- Note
 - Acts as a wrapper for std::filesystem 
 
 
◆ DeleteDirectory()
  
  
      
        
          | bool Nui::Filesystem::DeleteDirectory  | 
          ( | 
          const fs::path & |           path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Delete directory. 
- Parameters
 - 
  
  
 
- Returns
 - True if directory was deleted 
 
 
 
◆ Exists()
  
  
      
        
          | bool Nui::Filesystem::Exists  | 
          ( | 
          const fs::path & |           path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Check if path exists. 
- Parameters
 - 
  
  
 
- Returns
 - True if path exists 
 
 
 
◆ GetCurrentWorkingDirectory()
  
  
      
        
          | fs::path Nui::Filesystem::GetCurrentWorkingDirectory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Get current working directory. 
- Returns
 - Current working directory 
 
- Note
 - This is equivalent to fs::current_path() 
 
 
 
◆ GetFileExtension()
  
  
      
        
          | String Nui::Filesystem::GetFileExtension  | 
          ( | 
          const fs::path & |           path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Get file extension. 
- Parameters
 - 
  
    | path | Path to get extension from  | 
  
   
- Returns
 - File extension 
 
 
 
◆ GetFilename()
  
  
      
        
          | String Nui::Filesystem::GetFilename  | 
          ( | 
          const fs::path & |           path,  | 
         
        
           | 
           | 
          bool |           includeExtension = true ) | 
         
       
   | 
  
static   | 
  
 
Get filename. 
- Parameters
 - 
  
    | path | Path to get filename from  | 
    | includeExtension | Include file extension  | 
  
   
- Returns
 - Filename 
 
 
 
◆ GetFileSize()
  
  
      
        
          | U32Max Nui::Filesystem::GetFileSize  | 
          ( | 
          const fs::path & |           path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Get file size. 
- Parameters
 - 
  
    | path | Path to get file size from  | 
  
   
- Returns
 - File size 
 
 
 
◆ IsDirectory()
  
  
      
        
          | bool Nui::Filesystem::IsDirectory  | 
          ( | 
          const fs::path & |           path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Check if path is a directory. 
- Parameters
 - 
  
  
 
- Returns
 - True if path is a directory 
 
 
 
◆ IsFile()
  
  
      
        
          | bool Nui::Filesystem::IsFile  | 
          ( | 
          const fs::path & |           path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Check if path is a file. 
- Parameters
 - 
  
  
 
- Returns
 - True if path is a file 
 
 
 
◆ MakeDirectory()
  
  
      
        
          | bool Nui::Filesystem::MakeDirectory  | 
          ( | 
          const fs::path & |           path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Create directory. 
- Parameters
 - 
  
  
 
- Returns
 - True if directory was created or already exists 
 
 
 
◆ ReadFileAsBytes()
  
  
      
        
          | std::vector< Byte > Nui::Filesystem::ReadFileAsBytes  | 
          ( | 
          const fs::path & |           path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Read file as bytes. 
- Parameters
 - 
  
  
 
- Returns
 - File contents 
 
 
 
◆ ReadFileAsString()
  
  
      
        
          | String Nui::Filesystem::ReadFileAsString  | 
          ( | 
          const fs::path & |           path | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Read file as string. 
- Parameters
 - 
  
  
 
- Returns
 - File contents as String 
 
 
 
The documentation for this class was generated from the following files:
- Engine/Core/Utils/Filesystem.h
 
- Engine/Core/Utils/Filesystem.cpp