Craig's Utility Library  4.0 Beta
Utilities.IO.FileSystem.Interfaces.IDirectory Interface Reference

Represents a directory More...

Inheritance diagram for Utilities.IO.FileSystem.Interfaces.IDirectory:
Utilities.IO.DirectoryInfo Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType > Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract

Public Member Functions

IDirectory CopyTo (IDirectory Directory, CopyOptions Options=CopyOptions.CopyAlways)
 Copies the directory to the specified parent directory More...
 
void Create ()
 Creates the directory if it does not currently exist More...
 
void Delete ()
 Deletes the directory More...
 
IEnumerable< IDirectoryEnumerateDirectories (string SearchPattern="*", SearchOption Options=SearchOption.TopDirectoryOnly)
 Enumerates sub directories (defaults to top level sub directories) More...
 
IEnumerable< IDirectoryEnumerateDirectories (Predicate< IDirectory > Predicate, SearchOption Options=SearchOption.TopDirectoryOnly)
 Enumerates sub directories (defaults to top level sub directories) More...
 
IEnumerable< IFileEnumerateFiles (string SearchPattern="*", SearchOption Options=SearchOption.TopDirectoryOnly)
 Enumerates files within the directory (defaults to top level directory and not the sub directories) More...
 
IEnumerable< IFileEnumerateFiles (Predicate< IFile > Predicate, SearchOption Options=SearchOption.TopDirectoryOnly)
 Enumerates files within the directory (defaults to top level directory and not the sub directories) More...
 
IDirectory MoveTo (IDirectory Directory)
 Moves the directory to the specified parent directory More...
 
void Rename (string Name)
 Renames the directory More...
 

Properties

DateTime Accessed [get]
 Last time it was accessed More...
 
DateTime Created [get]
 When it was created More...
 
bool Exists [get]
 Does the directory exist More...
 
string FullName [get]
 Full path to the directory More...
 
DateTime Modified [get]
 When it was last modified More...
 
string Name [get]
 Name of the directory More...
 
IDirectory Parent [get]
 Parent directory More...
 
IDirectory Root [get]
 Root directory More...
 
long Size [get]
 Size of the contents of the directory in bytes More...
 

Detailed Description

Represents a directory

Definition at line 35 of file IDirectory.cs.

Member Function Documentation

IDirectory Utilities.IO.FileSystem.Interfaces.IDirectory.CopyTo ( IDirectory  Directory,
CopyOptions  Options = CopyOptions.CopyAlways 
)

Copies the directory to the specified parent directory

Parameters
DirectoryDirectory to copy to
OptionsCopy options

Implemented in Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.

void Utilities.IO.FileSystem.Interfaces.IDirectory.Create ( )
IEnumerable<IDirectory> Utilities.IO.FileSystem.Interfaces.IDirectory.EnumerateDirectories ( string  SearchPattern = "*",
SearchOption  Options = SearchOption.TopDirectoryOnly 
)

Enumerates sub directories (defaults to top level sub directories)

Parameters
SearchPatternSearch pattern to use
OptionsSearch options to use
Returns
The list of directories

Implemented in Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >, and Utilities.IO.DirectoryInfo.

IEnumerable<IDirectory> Utilities.IO.FileSystem.Interfaces.IDirectory.EnumerateDirectories ( Predicate< IDirectory Predicate,
SearchOption  Options = SearchOption.TopDirectoryOnly 
)

Enumerates sub directories (defaults to top level sub directories)

Parameters
PredicatePredicate used to filter directories
OptionsSearch options to use
Returns
The list of directories

Implemented in Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >, and Utilities.IO.DirectoryInfo.

IEnumerable<IFile> Utilities.IO.FileSystem.Interfaces.IDirectory.EnumerateFiles ( string  SearchPattern = "*",
SearchOption  Options = SearchOption.TopDirectoryOnly 
)

Enumerates files within the directory (defaults to top level directory and not the sub directories)

Parameters
SearchPatternSearch pattern to use
OptionsSearch options to use
Returns
The list of files

Implemented in Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >, and Utilities.IO.DirectoryInfo.

IEnumerable<IFile> Utilities.IO.FileSystem.Interfaces.IDirectory.EnumerateFiles ( Predicate< IFile Predicate,
SearchOption  Options = SearchOption.TopDirectoryOnly 
)

Enumerates files within the directory (defaults to top level directory and not the sub directories)

Parameters
PredicatePredicate used to filter files
OptionsSearch options to use
Returns
The list of files

Implemented in Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >, and Utilities.IO.DirectoryInfo.

IDirectory Utilities.IO.FileSystem.Interfaces.IDirectory.MoveTo ( IDirectory  Directory)

Moves the directory to the specified parent directory

Parameters
DirectoryDirectory to move to

Implemented in Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >, Utilities.IO.DirectoryInfo, and Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.

void Utilities.IO.FileSystem.Interfaces.IDirectory.Rename ( string  Name)

Property Documentation

DateTime Utilities.IO.FileSystem.Interfaces.IDirectory.Accessed
get

Last time it was accessed

Definition at line 40 of file IDirectory.cs.

DateTime Utilities.IO.FileSystem.Interfaces.IDirectory.Created
get

When it was created

Definition at line 45 of file IDirectory.cs.

bool Utilities.IO.FileSystem.Interfaces.IDirectory.Exists
get

Does the directory exist

Definition at line 50 of file IDirectory.cs.

string Utilities.IO.FileSystem.Interfaces.IDirectory.FullName
get

Full path to the directory

Definition at line 55 of file IDirectory.cs.

DateTime Utilities.IO.FileSystem.Interfaces.IDirectory.Modified
get

When it was last modified

Definition at line 60 of file IDirectory.cs.

string Utilities.IO.FileSystem.Interfaces.IDirectory.Name
get

Name of the directory

Definition at line 65 of file IDirectory.cs.

IDirectory Utilities.IO.FileSystem.Interfaces.IDirectory.Parent
get

Parent directory

Definition at line 70 of file IDirectory.cs.

IDirectory Utilities.IO.FileSystem.Interfaces.IDirectory.Root
get

Root directory

Definition at line 75 of file IDirectory.cs.

long Utilities.IO.FileSystem.Interfaces.IDirectory.Size
get

Size of the contents of the directory in bytes

Definition at line 80 of file IDirectory.cs.


The documentation for this interface was generated from the following file: