DirectoryInfoBase.GetFile(String) 方法

定义

返回表示目录中文件的 FileInfoBase 实例。Returns an instance of FileInfoBase that represents a file in the directory.

public:
 abstract Microsoft::Extensions::FileSystemGlobbing::Abstractions::FileInfoBase ^ GetFile(System::String ^ path);
public abstract Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase GetFile (string path);
abstract member GetFile : string -> Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase
Public MustOverride Function GetFile (path As String) As FileInfoBase

参数

path
String

文件名The file name

返回

FileInfoBase

即使文件不存在,也返回 FileInfoBase 的实例Instance of FileInfoBase even if file does not exist

适用于