Logo
クラス | 公開型 | 公開メンバ関数 | 静的公開メンバ関数 | 公開変数類 | 全メンバ一覧
Yukar.Common.FileUtil クラス

ファイル操作に関するユーティリティクラス [詳解]

クラス

struct AssetEntry

公開型

enum FileFuncFlags : uint {
FO_MOVE = 0x1 , FO_COPY = 0x2 , FO_DELETE = 0x3 , FO_RENAME = 0x4 ,
FO_MOVE = 0x1 , FO_COPY = 0x2 , FO_DELETE = 0x3 , FO_RENAME = 0x4
}
enum FILEOP_FLAGS : ushort {
FOF_MULTIDESTFILES = 0x1 , FOF_CONFIRMMOUSE = 0x2 , FOF_SILENT = 0x4 , FOF_RENAMEONCOLLISION = 0x8 ,
FOF_NOCONFIRMATION = 0x10 , FOF_WANTMAPPINGHANDLE = 0x20 , FOF_ALLOWUNDO = 0x40 , FOF_FILESONLY = 0x80 ,
FOF_SIMPLEPROGRESS = 0x100 , FOF_NOCONFIRMMKDIR = 0x200 , FOF_NOERRORUI = 0x400 , FOF_NOCOPYSECURITYATTRIBS = 0x800 ,
FOF_NORECURSION = 0x1000 , FOF_NO_CONNECTED_ELEMENTS = 0x2000 , FOF_WANTNUKEWARNING = 0x4000 , FOF_NORECURSEREPARSE = 0x8000 ,
FOF_MULTIDESTFILES = 0x1 , FOF_CONFIRMMOUSE = 0x2 , FOF_SILENT = 0x4 , FOF_RENAMEONCOLLISION = 0x8 ,
FOF_NOCONFIRMATION = 0x10 , FOF_WANTMAPPINGHANDLE = 0x20 , FOF_ALLOWUNDO = 0x40 , FOF_FILESONLY = 0x80 ,
FOF_SIMPLEPROGRESS = 0x100 , FOF_NOCONFIRMMKDIR = 0x200 , FOF_NOERRORUI = 0x400 , FOF_NOCOPYSECURITYATTRIBS = 0x800 ,
FOF_NORECURSION = 0x1000 , FOF_NO_CONNECTED_ELEMENTS = 0x2000 , FOF_WANTNUKEWARNING = 0x4000 , FOF_NORECURSEREPARSE = 0x8000
}
enum FileFuncFlags : uint {
FO_MOVE = 0x1 , FO_COPY = 0x2 , FO_DELETE = 0x3 , FO_RENAME = 0x4 ,
FO_MOVE = 0x1 , FO_COPY = 0x2 , FO_DELETE = 0x3 , FO_RENAME = 0x4
}
ファイル操作種別
enum FILEOP_FLAGS : ushort {
FOF_MULTIDESTFILES = 0x1 , FOF_CONFIRMMOUSE = 0x2 , FOF_SILENT = 0x4 , FOF_RENAMEONCOLLISION = 0x8 ,
FOF_NOCONFIRMATION = 0x10 , FOF_WANTMAPPINGHANDLE = 0x20 , FOF_ALLOWUNDO = 0x40 , FOF_FILESONLY = 0x80 ,
FOF_SIMPLEPROGRESS = 0x100 , FOF_NOCONFIRMMKDIR = 0x200 , FOF_NOERRORUI = 0x400 , FOF_NOCOPYSECURITYATTRIBS = 0x800 ,
FOF_NORECURSION = 0x1000 , FOF_NO_CONNECTED_ELEMENTS = 0x2000 , FOF_WANTNUKEWARNING = 0x4000 , FOF_NORECURSEREPARSE = 0x8000 ,
FOF_MULTIDESTFILES = 0x1 , FOF_CONFIRMMOUSE = 0x2 , FOF_SILENT = 0x4 , FOF_RENAMEONCOLLISION = 0x8 ,
FOF_NOCONFIRMATION = 0x10 , FOF_WANTMAPPINGHANDLE = 0x20 , FOF_ALLOWUNDO = 0x40 , FOF_FILESONLY = 0x80 ,
FOF_SIMPLEPROGRESS = 0x100 , FOF_NOCONFIRMMKDIR = 0x200 , FOF_NOERRORUI = 0x400 , FOF_NOCOPYSECURITYATTRIBS = 0x800 ,
FOF_NORECURSION = 0x1000 , FOF_NO_CONNECTED_ELEMENTS = 0x2000 , FOF_WANTNUKEWARNING = 0x4000 , FOF_NORECURSEREPARSE = 0x8000
}
ファイル操作フラグ [詳解]

公開メンバ関数

string getFileName (string path)
string getFileNameWithoutExtension (string path)
virtual bool exists (string path)
virtual StreamReader getStreamReader (string path, Encoding encoding=null)
virtual string[] getDirectories (string path)
virtual string[] getDirectories (string path, string pattern, SearchOption searchOption)
virtual bool dirExists (string path)
virtual string getDirName (string path)
virtual string[] getFiles (string path)
virtual string[] getFiles (string path, string pattern, SearchOption searchOption=SearchOption.TopDirectoryOnly)
virtual Stream getFileStream (string path)
string getFileName (string path)
string getFileNameWithoutExtension (string path)
virtual bool exists (string path)
virtual StreamReader getStreamReader (string path, Encoding encoding=null)
virtual string[] getDirectories (string path)
virtual string[] getDirectories (string path, string pattern, SearchOption searchOption)
virtual bool dirExists (string path)
virtual string getDirName (string path)
virtual string[] getFiles (string path)
virtual string[] getFiles (string path, string pattern, SearchOption searchOption=SearchOption.TopDirectoryOnly)
virtual Stream getFileStream (string path)

静的公開メンバ関数

static void copyFile (IntPtr handle, List< string > srcList, List< string > destList)
static void copyFile (IntPtr handle, string src, string dest)
static void initialize ()
static string GetFullPath (string path)
static void copyFile (IntPtr handle, List< string > srcList, List< string > destList)
static void copyFile (IntPtr handle, string src, string dest)
static void deleteFile (IntPtr handle, List< string > deleteList, bool isConfirm)
static void initialize ()
static bool IsDefaultCheckFile (string path)
static MemoryStream getMemoryStream (string path)
static string GetFullPath (string path, bool inReturnCurrentFolderOnError=true)
パスのフルパスを取得 [詳解]
static bool Exists (string inPath)
ファイルの存在確認(エンジン再生対応) [詳解]
static string CreateNewFilePath (string inFolderName, string inFileName)
新しいファイル名の作成 [詳解]
static string CreateTempDir ()
テンポラリフォルダの作成 [詳解]

公開変数類

bool skipUnexistedFiles

詳解

ファイル操作に関するユーティリティクラス

列挙型メンバ詳解

FILEOP_FLAGS [1/2]

列挙値
FOF_SILENT

Don't create progress/report

FOF_NOCONFIRMATION

Don't prompt the user.

FOF_WANTMAPPINGHANDLE

Fill in SHFILEOPSTRUCT.hNameMappings. Must be freed using SHFreeNameMappings

FOF_FILESONLY

On *.*, do only files

FOF_SIMPLEPROGRESS

Don't show names of files

FOF_NOCONFIRMMKDIR

Don't confirm making any needed dirs

FOF_NOERRORUI

Don't put up error UI

FOF_NOCOPYSECURITYATTRIBS

Dont copy NT file Security Attributes

FOF_NORECURSION

Don't recurse into directories.

FOF_NO_CONNECTED_ELEMENTS

Don't operate on connected elements.

FOF_WANTNUKEWARNING

During delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)

FOF_NORECURSEREPARSE

Treat reparse points as objects, not containers

FOF_SILENT

Don't create progress/report

FOF_NOCONFIRMATION

Don't prompt the user.

FOF_WANTMAPPINGHANDLE

Fill in SHFILEOPSTRUCT.hNameMappings. Must be freed using SHFreeNameMappings

FOF_FILESONLY

On *.*, do only files

FOF_SIMPLEPROGRESS

Don't show names of files

FOF_NOCONFIRMMKDIR

Don't confirm making any needed dirs

FOF_NOERRORUI

Don't put up error UI

FOF_NOCOPYSECURITYATTRIBS

Dont copy NT file Security Attributes

FOF_NORECURSION

Don't recurse into directories.

FOF_NO_CONNECTED_ELEMENTS

Don't operate on connected elements.

FOF_WANTNUKEWARNING

During delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)

FOF_NORECURSEREPARSE

Treat reparse points as objects, not containers

FILEOP_FLAGS [2/2]

ファイル操作フラグ

列挙値
FOF_SILENT

Don't create progress/report

FOF_NOCONFIRMATION

Don't prompt the user.

FOF_WANTMAPPINGHANDLE

Fill in SHFILEOPSTRUCT.hNameMappings. Must be freed using SHFreeNameMappings

FOF_FILESONLY

On *.*, do only files

FOF_SIMPLEPROGRESS

Don't show names of files

FOF_NOCONFIRMMKDIR

Don't confirm making any needed dirs

FOF_NOERRORUI

Don't put up error UI

FOF_NOCOPYSECURITYATTRIBS

Dont copy NT file Security Attributes

FOF_NORECURSION

Don't recurse into directories.

FOF_NO_CONNECTED_ELEMENTS

Don't operate on connected elements.

FOF_WANTNUKEWARNING

During delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)

FOF_NORECURSEREPARSE

Treat reparse points as objects, not containers

FOF_SILENT

Don't create progress/report

FOF_NOCONFIRMATION

Don't prompt the user.

FOF_WANTMAPPINGHANDLE

Fill in SHFILEOPSTRUCT.hNameMappings. Must be freed using SHFreeNameMappings

FOF_FILESONLY

On *.*, do only files

FOF_SIMPLEPROGRESS

Don't show names of files

FOF_NOCONFIRMMKDIR

Don't confirm making any needed dirs

FOF_NOERRORUI

Don't put up error UI

FOF_NOCOPYSECURITYATTRIBS

Dont copy NT file Security Attributes

FOF_NORECURSION

Don't recurse into directories.

FOF_NO_CONNECTED_ELEMENTS

Don't operate on connected elements.

FOF_WANTNUKEWARNING

During delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)

FOF_NORECURSEREPARSE

Treat reparse points as objects, not containers

メソッド詳解

CreateNewFilePath()

static string Yukar.Common.FileUtil.CreateNewFilePath ( string inFolderName,
string inFileName
)
static

新しいファイル名の作成

引数
inFolderName フォルダ名
inFileName 元ファイル名
戻り値
新しいファイル名

CreateTempDir()

static string Yukar.Common.FileUtil.CreateTempDir ( )
static

テンポラリフォルダの作成

戻り値
テンポラリフォルダのパス

Exists()

static bool Yukar.Common.FileUtil.Exists ( string inPath )
static

ファイルの存在確認(エンジン再生対応)

引数
inPath ファイルパス
戻り値

GetFullPath()

static string Yukar.Common.FileUtil.GetFullPath ( string path,
bool inReturnCurrentFolderOnError = true
)
static

パスのフルパスを取得

引数
path パス
inReturnCurrentFolderOnError エラー時にカレントフォルダを返す(false指定では空文字列)
戻り値

このクラス詳解は次のファイルから抽出されました: