Craig's Utility Library  4.0 Beta
Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract Class Reference

IDirectory contract class More...

Inheritance diagram for Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract:
Utilities.IO.FileSystem.Interfaces.IDirectory

Public Member Functions

object Clone ()
 Creates a new object that is a copy of the current instance. More...
 
int CompareTo (IDirectory other)
 Compares the current object with another object of the same type. More...
 
int CompareTo (object obj)
 Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. More...
 
IDirectory CopyTo (IDirectory Directory, Enums.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="*", System.IO.SearchOption Options=SearchOption.TopDirectoryOnly)
 Enumerates sub directories (defaults to top level sub directories) More...
 
IEnumerable< IDirectoryEnumerateDirectories (Predicate< IDirectory > Predicate, System.IO.SearchOption Options=SearchOption.TopDirectoryOnly)
 Enumerates sub directories (defaults to top level sub directories) More...
 
IEnumerable< IFileEnumerateFiles (string SearchPattern="*", System.IO.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, System.IO.SearchOption Options=SearchOption.TopDirectoryOnly)
 Enumerates files within the directory (defaults to top level directory and not the sub directories) More...
 
bool Equals (IDirectory other)
 Indicates whether the current object is equal to another object of the same type. More...
 
IEnumerator< IFileGetEnumerator ()
 Returns an enumerator that iterates through the collection. More...
 
IDirectory MoveTo (IDirectory Directory)
 Moves the directory to the specified parent directory More...
 
void Rename (string Name)
 Renames the directory More...
 
- Public Member Functions inherited from Utilities.IO.FileSystem.Interfaces.IDirectory
IDirectory CopyTo (IDirectory Directory, CopyOptions Options=CopyOptions.CopyAlways)
 Copies the directory to the specified parent 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...
 

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...
 
- Properties inherited from Utilities.IO.FileSystem.Interfaces.IDirectory
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

IDirectory contract class

Definition at line 34 of file IDirectoryContract.cs.

Member Function Documentation

object Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Clone ( )

Creates a new object that is a copy of the current instance.

Returns
A new object that is a copy of this instance.

Definition at line 120 of file IDirectoryContract.cs.

int Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.CompareTo ( IDirectory  other)

Compares the current object with another object of the same type.

Parameters
otherAn object to compare with this object.
Returns
A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other . Greater than zero This object is greater than other .

Definition at line 135 of file IDirectoryContract.cs.

int Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.CompareTo ( object  obj)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Parameters
objAn object to compare with this instance.
Returns
A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes obj in the sort order. Zero This instance occurs in the same position in the sort order as obj . Greater than zero This instance follows obj in the sort order.

Definition at line 153 of file IDirectoryContract.cs.

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

Copies the directory to the specified parent directory

Parameters
DirectoryDirectory to copy to
OptionsCopy options
Returns

Definition at line 164 of file IDirectoryContract.cs.

void Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Create ( )

Creates the directory if it does not currently exist

Implements Utilities.IO.FileSystem.Interfaces.IDirectory.

Definition at line 173 of file IDirectoryContract.cs.

void Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Delete ( )

Deletes the directory

Implements Utilities.IO.FileSystem.Interfaces.IDirectory.

Definition at line 180 of file IDirectoryContract.cs.

IEnumerable<IDirectory> Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.EnumerateDirectories ( string  SearchPattern = "*",
System.IO.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

Definition at line 190 of file IDirectoryContract.cs.

IEnumerable<IDirectory> Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.EnumerateDirectories ( Predicate< IDirectory Predicate,
System.IO.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

Definition at line 202 of file IDirectoryContract.cs.

IEnumerable<IFile> Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.EnumerateFiles ( string  SearchPattern = "*",
System.IO.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

Definition at line 215 of file IDirectoryContract.cs.

IEnumerable<IFile> Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.EnumerateFiles ( Predicate< IFile Predicate,
System.IO.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

Definition at line 227 of file IDirectoryContract.cs.

bool Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Equals ( IDirectory  other)

Indicates whether the current object is equal to another object of the same type.

Parameters
otherAn object to compare with this object.
Returns
true if the current object is equal to the other parameter; otherwise, false.

Definition at line 242 of file IDirectoryContract.cs.

IEnumerator<IFile> Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.GetEnumerator ( )

Returns an enumerator that iterates through the collection.

Returns
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.

Definition at line 254 of file IDirectoryContract.cs.

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

Moves the directory to the specified parent directory

Parameters
DirectoryDirectory to move to
Returns

Implements Utilities.IO.FileSystem.Interfaces.IDirectory.

Definition at line 264 of file IDirectoryContract.cs.

void Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Rename ( string  Name)

Renames the directory

Parameters
NameThe new name of the directory

Implements Utilities.IO.FileSystem.Interfaces.IDirectory.

Definition at line 274 of file IDirectoryContract.cs.

Property Documentation

DateTime Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Accessed
get

Last time it was accessed

Definition at line 40 of file IDirectoryContract.cs.

DateTime Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Created
get

When it was created

Definition at line 48 of file IDirectoryContract.cs.

bool Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Exists
get

Does the directory exist

Definition at line 56 of file IDirectoryContract.cs.

string Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.FullName
get

Full path to the directory

Definition at line 64 of file IDirectoryContract.cs.

DateTime Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Modified
get

When it was last modified

Definition at line 76 of file IDirectoryContract.cs.

string Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Name
get

Name of the directory

Definition at line 84 of file IDirectoryContract.cs.

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

Parent directory

Definition at line 96 of file IDirectoryContract.cs.

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

Root directory

Definition at line 104 of file IDirectoryContract.cs.

long Utilities.IO.FileSystem.Interfaces.Contracts.IDirectoryContract.Size
get

Size of the contents of the directory in bytes

Definition at line 112 of file IDirectoryContract.cs.


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