PhysicalDirectoryInfo 类

定义

表示物理文件系统上的目录。Represents a directory on a physical filesystem.

public ref class PhysicalDirectoryInfo : Microsoft::Extensions::FileProviders::IFileInfo
public class PhysicalDirectoryInfo : Microsoft.Extensions.FileProviders.IFileInfo
type PhysicalDirectoryInfo = class
    interface IFileInfo
Public Class PhysicalDirectoryInfo
Implements IFileInfo
继承
PhysicalDirectoryInfo
实现

构造函数

PhysicalDirectoryInfo(DirectoryInfo)

初始化包装 DirectoryInfo 实例的 PhysicalDirectoryInfo 实例Initializes an instance of PhysicalDirectoryInfo that wraps an instance of DirectoryInfo

属性

Exists

确定基础存储系统中是否存在此资源。Determines if the resource exists in the underlying storage system.

IsDirectory

始终为 true。Always true.

LastModified

上次写入目录的时间。The time when the directory was last written to.

Length

始终等于 -1。Always equals -1.

Name

获取文件或目录的名称,不包括路径。Gets the name of the file or directory, excluding the path.

PhysicalPath

获取文件的完整路径,包括文件名。Gets the full path to the file, including the file name.

方法

CreateReadStream()

总是引发异常,因为目录不支持读取的流。Always throws an exception because read streams are not support on directories.

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于