Table of Contents

Class InMemoryDirectoryInfo

Namespace
Acuit.Pinpoint.FileSystemGlobbing
Assembly
Acuit.Pinpoint.Configuration.dll

Avoids using disk for uses like Pattern Matching.

public class InMemoryDirectoryInfo : DirectoryInfoBase
Inheritance
InMemoryDirectoryInfo
Inherited Members

Constructors

InMemoryDirectoryInfo(string, IEnumerable<string>)

Creates a new InMemoryDirectoryInfo with the root directory and files given.

public InMemoryDirectoryInfo(string rootDir, IEnumerable<string> files)

Parameters

rootDir string

The root directory that this FileSystem will use.

files IEnumerable<string>

Collection of file names. If relative paths rootDir will be prepended to the paths.

Properties

FullName

A string containing the full path of the file or directory

public override string FullName { get; }

Property Value

string

Name

A string containing the name of the file or directory

public override string Name { get; }

Property Value

string

ParentDirectory

The parent directory for the current file or directory

public override DirectoryInfoBase ParentDirectory { get; }

Property Value

DirectoryInfoBase

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 path)

Parameters

path string

The directory name

Returns

DirectoryInfoBase

Instance of DirectoryInfoBase even if directory does not exist

GetFile(string)

Returns an instance of FileInfoBase that matches the path given.

public override FileInfoBase GetFile(string path)

Parameters

path string

The filename.

Returns

FileInfoBase

Instance of FileInfoBase if the file exists, null otherwise.