System::IO::FileSystemInfo 类

FileSystemInfo class

FileInfoDirectoryInfo 的基类。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 new 运算符创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。

class FileSystemInfo : public System::Object

方法

方法描述
virtual Delete()删除当前对象表示的实体。
virtual Finalize()不执行任何操作。
get_Attributes()返回当前对象表示的实体的属性。
get_CreationTime()以本地时间返回当前对象表示的实体的创建时间。
get_CreationTimeUtc()以 UTC 时间返回当前对象表示的实体的创建时间。
virtual get_Exists()确定当前对象表示的路径所引用的实体是否存在。
get_Extension()返回当前对象表示的文件的扩展名。
virtual get_FullName()返回当前对象表示的实体的完整名称(包括路径)。
get_LastAccessTime()返回当前对象表示的实体的上次访问时间(本地时间)。
get_LastAccessTimeUtc()返回当前对象表示的实体的上次访问时间(UTC 时间)。
get_LastWriteTime()返回当前对象表示的实体的上次写入时间(本地时间)。
get_LastWriteTimeUtc()返回当前对象表示的实体的上次写入时间(UTC 时间)。
virtual get_Name()返回当前对象表示的实体的名称。
Refresh()刷新当前对象的状态。
set_Attributes(FileAttributes)在当前对象表示的实体上设置指定的属性。
set_CreationTime(DateTime)将当前对象表示的实体的创建时间设置为本地时间。
set_CreationTimeUtc(DateTime)将当前对象表示的实体的创建时间设置为 UTC 时间。
set_LastAccessTime(DateTime)将当前对象表示的实体的上次访问时间设置为本地时间。
set_LastAccessTimeUtc(DateTime)将当前对象表示的实体的上次访问时间设置为 UTC 时间。
set_LastWriteTime(DateTime)将当前对象表示的实体的上次写入时间设置为本地时间。
set_LastWriteTimeUtc(DateTime)将当前对象表示的实体的上次写入时间设置为 UTC 时间。

另见