Class DirectoryInfoWrapper
- Namespace
- Acuit.Pinpoint.FileSystemGlobbing.Abstractions
- Assembly
- Acuit.Pinpoint.Configuration.dll
Wraps an instance of DirectoryInfo and provides implementation of DirectoryInfoBase.
public class DirectoryInfoWrapper : DirectoryInfoBase
- Inheritance
-
DirectoryInfoWrapper
- Inherited Members
Constructors
DirectoryInfoWrapper(DirectoryInfo)
Initializes an instance of DirectoryInfoWrapper.
public DirectoryInfoWrapper(DirectoryInfo directoryInfo)
Parameters
directoryInfo
DirectoryInfoThe DirectoryInfo.
Properties
FullName
Returns the full path to the directory.
public override string FullName { get; }
Property Value
Remarks
Equals the value of FullName.
Name
A string containing the name of the file or directory
public override string Name { get; }
Property Value
ParentDirectory
Returns the parent directory.
public override DirectoryInfoBase ParentDirectory { get; }
Property Value
Remarks
Equals the value of Parent.
Methods
EnumerateFileSystemInfos()
Enumerates all files and directories in the directory.
public override IEnumerable<FileSystemInfoBase> EnumerateFileSystemInfos()
Returns
- IEnumerable<FileSystemInfoBase>
Collection of files and directories
GetDirectory(string)
Returns an instance of DirectoryInfoBase that represents a subdirectory.
public override DirectoryInfoBase GetDirectory(string name)
Parameters
name
stringThe directory name
Returns
- DirectoryInfoBase
The directory
Remarks
If name
equals '..', this returns the parent directory.
GetFile(string)
Returns an instance of FileInfoBase that represents a file in the directory
public override FileInfoBase GetFile(string name)
Parameters
name
string
Returns
- FileInfoBase
Instance of FileInfoBase even if file does not exist