System.IOUtils.TDirectory

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

TDirectory = record

C++

struct DECLSPEC_DRECORD TDirectory
{
public:
    __interface DELPHIINTERFACE TFilterPredicate;
    typedef System::DelphiInterface<TFilterPredicate> _di_TFilterPredicate;
    __interface TFilterPredicate  : public System::IInterface
    {
        virtual bool __fastcall Invoke(const System::UnicodeString Path, const System::Sysutils::TSearchRec &SearchRec) = 0 ;
    };
private:
    __interface DELPHIINTERFACE TDirectoryWalkProc;
    typedef System::DelphiInterface<TDirectoryWalkProc> _di_TDirectoryWalkProc;
    __interface TDirectoryWalkProc  : public System::IInterface
    {
        virtual bool __fastcall Invoke(const System::UnicodeString Path, const System::Sysutils::TSearchRec &FileInfo) = 0 ;
    };
private:
    static void __fastcall InternalCheckDirPathParam(const System::UnicodeString Path, const bool ExistsCheck);
    static void __fastcall CheckCreateDirectoryParameters(const System::UnicodeString Path);
    static void __fastcall CheckCopyParameters(System::UnicodeString SourceDirName, System::UnicodeString DestDirName);
    static void __fastcall CheckDeleteParameters(const System::UnicodeString Path, const bool Recursive);
    static void __fastcall CheckGetAttributesParameters(const System::UnicodeString Path);
    static void __fastcall CheckGetDirectoriesParameters(const System::UnicodeString Path, const System::UnicodeString SearchPattern);
    static void __fastcall CheckGetDirectoryRootParameters(const System::UnicodeString Path);
    static void __fastcall CheckGetFilesParameters(System::UnicodeString Path, const System::UnicodeString SearchPattern);
    static void __fastcall CheckGetFileSystemEntriesParameters(System::UnicodeString Path, const System::UnicodeString SearchPattern);
    static void __fastcall CheckGetCreationTimeParameters(const System::UnicodeString Path);
    static void __fastcall CheckGetCreationTimeUtcParameters(const System::UnicodeString Path);
    static void __fastcall CheckGetLastAccessTimeParameters(const System::UnicodeString Path);
    static void __fastcall CheckGetLastAccessTimeUtcParameters(const System::UnicodeString Path);
    static void __fastcall CheckGetLastWriteTimeParameters(const System::UnicodeString Path);
    static void __fastcall CheckGetLastWriteTimeUtcParameters(const System::UnicodeString Path);
    static void __fastcall CheckGetParentParameters(const System::UnicodeString Path);
    static void __fastcall CheckMoveParameters(System::UnicodeString SourceDirName, System::UnicodeString DestDirName);
    static void __fastcall CheckSetAttributesParameters(const System::UnicodeString Path);
    static void __fastcall CheckSetCurrentDirectoryParameters(const System::UnicodeString Path);
    static void __fastcall CheckSetCreationTimeParameters(const System::UnicodeString Path);
    static void __fastcall CheckSetCreationTimeUtcParameters(const System::UnicodeString Path);
    static void __fastcall CheckSetLastAccessTimeParameters(const System::UnicodeString Path);
    static void __fastcall CheckSetLastAccessTimeUtcParameters(const System::UnicodeString Path);
    static void __fastcall CheckSetLastWriteTimeParameters(const System::UnicodeString Path);
    static void __fastcall CheckSetLastWriteTimeUtcParameters(const System::UnicodeString Path);
    static void __fastcall GetDateTimeInfo(const System::UnicodeString Path, /* out */ System::TDateTime &CreationTime, /* out */ System::TDateTime &LastAccessTime, /* out */ System::TDateTime &LastWriteTime, const bool UseLocalTimeZone);
    static void __fastcall SetDateTimeInfo(const System::UnicodeString Path, const System::PDateTime CreationTime, const System::PDateTime LastAccessTime, const System::PDateTime LastWriteTime, const bool UseLocalTimeZone);
    static _FILETIME __fastcall ConvertDateTimeToFileTime(const System::TDateTime DateTime, const bool UseLocalTimeZone);
    static System::TDateTime __fastcall DoGetCreationTime(const System::UnicodeString Path);
    static System::TDateTime __fastcall DoGetCreationTimeUtc(const System::UnicodeString Path);
    static System::TDateTime __fastcall DoGetLastAccessTime(const System::UnicodeString Path);
    static System::TDateTime __fastcall DoGetLastAccessTimeUtc(const System::UnicodeString Path);
    static System::TDateTime __fastcall DoGetLastWriteTime(const System::UnicodeString Path);
    static System::TDateTime __fastcall DoGetLastWriteTimeUtc(const System::UnicodeString Path);
    static void __fastcall DoSetCreationTime(const System::UnicodeString Path, const System::TDateTime CreationTime);
    static void __fastcall DoSetCreationTimeUtc(const System::UnicodeString Path, const System::TDateTime CreationTime);
    static void __fastcall DoSetLastAccessTime(const System::UnicodeString Path, const System::TDateTime LastAccessTime);
    static void __fastcall DoSetLastAccessTimeUtc(const System::UnicodeString Path, const System::TDateTime LastAccessTime);
    static void __fastcall DoSetLastWriteTime(const System::UnicodeString Path, const System::TDateTime LastWriteTime);
    static void __fastcall DoSetLastWriteTimeUtc(const System::UnicodeString Path, const System::TDateTime LastWriteTime);
#ifndef _WIN64
    static System::DynamicArray<System::UnicodeString> __fastcall DoGetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate);
    static System::DynamicArray<System::UnicodeString> __fastcall DoGetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate);
    static System::DynamicArray<System::UnicodeString> __fastcall DoGetFileSystemEntries(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
#else /* _WIN64 */
    static System::TArray__1<System::UnicodeString> __fastcall DoGetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate);
    static System::TArray__1<System::UnicodeString> __fastcall DoGetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate);
    static System::TArray__1<System::UnicodeString> __fastcall DoGetFileSystemEntries(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
#endif /* _WIN64 */
    static void __fastcall WalkThroughDirectory(const System::UnicodeString Path, const System::UnicodeString Pattern, const _di_TDirectoryWalkProc PreCallback, const _di_TDirectoryWalkProc PostCallback, const bool Recursive);
public:
    static void __fastcall Copy(const System::UnicodeString SourceDirName, const System::UnicodeString DestDirName);
    static void __fastcall Copy(const System::UnicodeString SourceDirName, const System::UnicodeString DestDirName, bool IgnoreErrors) _ALWAYS_INLINE {
      DirectoryCopyCPP(SourceDirName, DestDirName, IgnoreErrors);
    };
    static void __fastcall CreateDirectory(const System::UnicodeString Path);
    static void __fastcall Delete(const System::UnicodeString Path)/* overload */;
    static void __fastcall Delete(const System::UnicodeString Path, const bool Recursive)/* overload */;
    static bool __fastcall Exists(const System::UnicodeString Path, bool FollowLink = true);
    static TFileAttributes __fastcall GetAttributes(const System::UnicodeString Path, bool FollowLink = true);
    static System::UnicodeString __fastcall GetCurrentDirectory();
    static void __fastcall SetCurrentDirectory(const System::UnicodeString Path);
#ifndef _WIN64
    static System::DynamicArray<System::UnicodeString> __fastcall GetLogicalDrives();
#else /* _WIN64 */
    static System::TArray__1<System::UnicodeString> __fastcall GetLogicalDrives();
#endif /* _WIN64 */
    static System::TDateTime __fastcall GetCreationTime(const System::UnicodeString Path);
    static System::TDateTime __fastcall GetCreationTimeUtc(const System::UnicodeString Path);
    static System::TDateTime __fastcall GetLastAccessTime(const System::UnicodeString Path);
    static System::TDateTime __fastcall GetLastAccessTimeUtc(const System::UnicodeString Path);
    static System::TDateTime __fastcall GetLastWriteTime(const System::UnicodeString Path);
    static System::TDateTime __fastcall GetLastWriteTimeUtc(const System::UnicodeString Path);
    static void __fastcall SetAttributes(const System::UnicodeString Path, const TFileAttributes Attributes);
    static void __fastcall SetCreationTime(const System::UnicodeString Path, const System::TDateTime CreationTime);
    static void __fastcall SetCreationTimeUtc(const System::UnicodeString Path, const System::TDateTime CreationTime);
    static void __fastcall SetLastAccessTime(const System::UnicodeString Path, const System::TDateTime LastAccessTime);
    static void __fastcall SetLastAccessTimeUtc(const System::UnicodeString Path, const System::TDateTime LastAccessTime);
    static void __fastcall SetLastWriteTime(const System::UnicodeString Path, const System::TDateTime LastWriteTime);
    static void __fastcall SetLastWriteTimeUtc(const System::UnicodeString Path, const System::TDateTime LastWriteTime);
    static System::UnicodeString __fastcall GetParent(const System::UnicodeString Path);
#ifndef _WIN64
    static System::DynamicArray<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const _di_TFilterPredicate Predicate)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const _di_TFilterPredicate Predicate)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
#else /* _WIN64 */
    static System::TArray__1<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const _di_TFilterPredicate Predicate)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const _di_TFilterPredicate Predicate)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetDirectories(const System::UnicodeString Path, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
#endif /* _WIN64 */
    static System::UnicodeString __fastcall GetDirectoryRoot(const System::UnicodeString Path);
#ifndef _WIN64
    static System::DynamicArray<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const _di_TFilterPredicate Predicate)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const _di_TFilterPredicate Predicate)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path, const _di_TFilterPredicate Predicate)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path, const System::UnicodeString SearchPattern)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const _di_TFilterPredicate Predicate)/* overload */;
    static System::DynamicArray<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
#else /* _WIN64 */
    static System::TArray__1<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const _di_TFilterPredicate Predicate)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const _di_TFilterPredicate Predicate)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFiles(const System::UnicodeString Path, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path, const _di_TFilterPredicate Predicate)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path, const System::UnicodeString SearchPattern)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const _di_TFilterPredicate Predicate)/* overload */;
    static System::TArray__1<System::UnicodeString> __fastcall GetFileSystemEntries(const System::UnicodeString Path, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
#endif /* _WIN64 */
    static bool __fastcall IsEmpty(const System::UnicodeString Path);
    static bool __fastcall IsRelativePath(const System::UnicodeString Path);
    static void __fastcall Move(const System::UnicodeString SourceDirName, const System::UnicodeString DestDirName);
};

プロパティ

種類 可視性 ソース ユニット
record
struct
public
System.IOUtils.pas
System.IOUtils.hpp
System.IOUtils System.IOUtils


説明

ディレクトリ操作で使われるたくさんの静的ユーティリティ メソッドを含んでいます。


TDirectory は、ディレクトリに対するさまざまな操作を実行するために使われる静的メソッドのみを含むレコードです。 TDirectory はインスタンス メソッドやフィールドを持たないため、TDirectory 型の変数を宣言してはいけません。 TDirectory を使用して実行できる操作には、以下のものがあります。

  • ディレクトリの作成、名前変更、および削除。
  • ディレクトリの走査(再帰的な走査も含む)。
  • ディレクトリの属性およびタイムスタンプの操作。

メモ: TDirectory が公開しているメソッドのほとんどは、.NET FrameworkDirectory クラスが公開しているメソッドとシグネチャの互換性があります。

関連項目