ファイルユーティリティクラス  
 [詳解]
#include <mgl_file_utility.h>
 | 
| size_t  | GetSize (const PathView &path) noexcept | 
|   | ファイルのサイズを取得  
  | 
|   | 
| const Result &  | MakeDirectory (const PathView &path) noexcept | 
|   | ディレクトリを作成する  
  | 
|   | 
| const Result &  | Move (const PathView &sourcePath, const PathView &destPath) noexcept | 
|   | ファイルの移動・リネーム  
  | 
|   | 
| const Result &  | Remove (const PathView &path) noexcept | 
|   | ファイルの削除  
  | 
|   | 
| const Result &  | Copy (const PathView &sourcePath, const PathView &destPath) noexcept | 
|   | ファイルのコピー  
  | 
|   | 
| bool  | Exists (const PathView &path) noexcept | 
|   | ファイルの存在をチェック  
  | 
|   | 
| bool  | IsSystemNativeFile (const PathView &path) noexcept | 
|   | システム標準のファイルであるかをチェック  
  | 
|   | 
| const Result &  | Mount (const PathView &mountName, const PathView &path, MountAccessType accessType, DelegateKey delegateKey=Mounter::kDefaultDelegateKey) noexcept | 
|   | マウント  
  | 
|   | 
| const Result &  | Unmount (const PathView &mountName) noexcept | 
|   | マウント解除  
  | 
|   | 
| const Result &  | Remount (const PathView &mountName, const PathView &path, MountAccessType accessType, DelegateKey delegateKey=Mounter::kDefaultDelegateKey) noexcept | 
|   | 再マウント  
  | 
|   | 
| STL::string  | GetSystemNativePath (const PathView &path) noexcept | 
|   | マウントパスからシステム標準のパスに変換  
  | 
|   | 
| const Result &  | RemoveDelegate (DelegateKey key) noexcept | 
|   | デリゲートの削除  
  | 
|   | 
| template<class DelegateClass , class... Args>  | 
| constexpr const Result &  | AddDelegate (DelegateKey key, Args... args) noexcept | 
|   | デリゲートの追加  
  | 
|   | 
| constexpr const Result &  | GetResult () const noexcept | 
|   | 処理結果の取得  
  | 
|   | 
| constexpr bool  | HasError () const noexcept | 
|   | 最後の処理でエラーが発生しているかの取得  
  | 
|   | 
◆ AddDelegate()
template<class DelegateClass , class... Args> 
 
デリゲートの追加 
- テンプレート引数
 - 
  
    | DelegateClass | 追加するデリゲートクラス  | 
  
   
- 引数
 - 
  
    | [in] | key | デリゲートキー  | 
    | [in] | args | デリゲートクラスのコンストラクタに渡す引数  | 
  
   
- 戻り値
 - 失敗時にはいずれかのエラーが設定される 
 
 
 
◆ Copy()
ファイルのコピー 
- 引数
 - 
  
    | [in] | sourcePath | コピー元のパス  | 
    | [in] | destPath | コピー先のパス  | 
  
   
- 戻り値
 - 失敗時にはいずれかのエラーが設定される 
 
 
 
◆ Exists()
  
  
      
        
          | bool MGL::File::Utility::Exists  | 
          ( | 
          const PathView & |           path | ) | 
           | 
         
       
   | 
  
nodiscardnoexcept   | 
  
 
ファイルの存在をチェック 
- 引数
 - 
  
  
 
- 戻り値
 - 
  
  
 
- 覚え書き
 - 失敗時には戻り値にいずれかのエラーが設定される 
 
 
 
◆ GetResult()
  
  
      
        
          | const Result & MGL::File::Utility::GetResult  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenodiscardconstexprnoexcept   | 
  
 
処理結果の取得 
- 戻り値
 - 最後に実行した処理の処理結果 
 
 
 
◆ GetSize()
  
  
      
        
          | size_t MGL::File::Utility::GetSize  | 
          ( | 
          const PathView & |           path | ) | 
           | 
         
       
   | 
  
nodiscardnoexcept   | 
  
 
ファイルのサイズを取得 
- 引数
 - 
  
  
 
- 戻り値
 - ファイルサイズ 
 
 
 
◆ GetSystemNativePath()
マウントパスからシステム標準のパスに変換 
- 引数
 - 
  
  
 
- 戻り値
 - システム標準のパス.失敗時にはいずれかのエラーが設定される 
 
 
 
◆ HasError()
  
  
      
        
          | bool MGL::File::Utility::HasError  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenodiscardconstexprnoexcept   | 
  
 
最後の処理でエラーが発生しているかの取得 
- 戻り値
 - 
  
    | true | エラーが発生している  | 
    | false | エラーは発生していない  | 
  
   
 
 
◆ IsMounted()
  
  
      
        
          | bool MGL::File::Utility::IsMounted  | 
          ( | 
          const PathView & |           mountName | ) | 
           | 
         
       
   | 
  
staticnodiscardnoexcept   | 
  
 
マウントされているかを取得 
- 引数
 - 
  
  
 
- 戻り値
 - 
  
    | true | マウントされている  | 
    | false | マウントされていない  | 
  
   
 
 
◆ IsSystemNativeFile()
  
  
      
        
          | bool MGL::File::Utility::IsSystemNativeFile  | 
          ( | 
          const PathView & |           path | ) | 
           | 
         
       
   | 
  
nodiscardnoexcept   | 
  
 
システム標準のファイルであるかをチェック 
- 引数
 - 
  
  
 
- 戻り値
 - 
  
    | true | システム標準のファイルである  | 
    | false | システム標準のファイルではない  | 
  
   
- 覚え書き
 - 失敗時には戻り値にいずれかのエラーが設定される 
 
 
 
◆ MakeDirectory()
  
  
      
        
          | const Result & MGL::File::Utility::MakeDirectory  | 
          ( | 
          const PathView & |           path | ) | 
           | 
         
       
   | 
  
noexcept   | 
  
 
ディレクトリを作成する 
- 引数
 - 
  
  
 
- 戻り値
 - 失敗時にはいずれかのエラーが設定される 
 
 
 
◆ Mount()
マウント 
- 引数
 - 
  
    | [in] | mountName | マウント名  | 
    | [in] | path | マウント先のパス  | 
    | [in] | accessType | アクセスタイプ  | 
    | [in] | delegateKey | デリゲートキー  | 
  
   
- 戻り値
 - 失敗時にはいずれかのエラーが設定される 
 
 
 
◆ Move()
ファイルの移動・リネーム 
- 引数
 - 
  
    | [in] | sourcePath | 移動元のパス  | 
    | [in] | destPath | 移動先のパス  | 
  
   
- 戻り値
 - 失敗時にはいずれかのエラーが設定される 
 
 
 
◆ Remount()
再マウント 
- 引数
 - 
  
    | [in] | mountName | マウント名  | 
    | [in] | path | マウント先のパス  | 
    | [in] | accessType | アクセスタイプ  | 
    | [in] | delegateKey | デリゲートキー  | 
  
   
- 戻り値
 - 失敗時にはいずれかのエラーが設定される 
 
 
 
◆ Remove()
ファイルの削除 
- 引数
 - 
  
  
 
- 戻り値
 - 失敗時にはいずれかのエラーが設定される 
 
 
 
◆ RemoveDelegate()
デリゲートの削除 
- 引数
 - 
  
  
 
- 戻り値
 - 失敗時にはいずれかのエラーが設定される 
 
 
 
◆ SetDefaultDelegate()
  
  
      
        
          | void MGL::File::Utility::SetDefaultDelegate  | 
          ( | 
          DelegateKey |           key | ) | 
           | 
         
       
   | 
  
staticnoexcept   | 
  
 
デフォルトのデリゲートを設定 
- 引数
 - 
  
  
 
- 覚え書き
 - この関数は例外を発生させず,File::SetDefaultDelegate()と等価である 
 
 
 
◆ Unmount()
  
  
      
        
          | const Result & MGL::File::Utility::Unmount  | 
          ( | 
          const PathView & |           mountName | ) | 
           | 
         
       
   | 
  
noexcept   | 
  
 
マウント解除 
- 引数
 - 
  
  
 
- 戻り値
 - 失敗時にはいずれかのエラーが設定される 
 
 
 
このクラス詳解は次のファイルから抽出されました: