Craig's Utility Library
4.0 Beta
|
Directory base class More...
Public Member Functions | |
object | Clone () |
Clones the directory object More... | |
int | CompareTo (IDirectory other) |
Compares this to another directory More... | |
int | CompareTo (object obj) |
Compares this object to another object More... | |
virtual IDirectory | CopyTo (IDirectory Directory, CopyOptions Options=CopyOptions.CopyAlways) |
Copies the directory to the specified parent directory More... | |
abstract void | Create () |
Creates the directory More... | |
abstract void | Delete () |
Deletes the directory More... | |
abstract IEnumerable< IDirectory > | EnumerateDirectories (string SearchPattern="*", SearchOption Options=SearchOption.TopDirectoryOnly) |
Enumerates directories under this directory More... | |
IEnumerable< IDirectory > | EnumerateDirectories (Predicate< IDirectory > Predicate, SearchOption Options=SearchOption.TopDirectoryOnly) |
Enumerates sub directories (defaults to top level sub directories) More... | |
abstract IEnumerable< IFile > | EnumerateFiles (string SearchPattern="*", SearchOption Options=SearchOption.TopDirectoryOnly) |
Enumerates files under this directory More... | |
IEnumerable< IFile > | EnumerateFiles (Predicate< IFile > Predicate, SearchOption Options=SearchOption.TopDirectoryOnly) |
Enumerates files within the directory (defaults to top level directory and not the sub directories) More... | |
override bool | Equals (object obj) |
Determines if the two directories are the same More... | |
bool | Equals (IDirectory other) |
Determines if the directories are equal More... | |
IEnumerator< IFile > | GetEnumerator () |
Enumerates the files in the directory More... | |
override int | GetHashCode () |
Returns the hash code for the directory More... | |
virtual IDirectory | MoveTo (IDirectory Directory) |
Moves this directory under another directory More... | |
abstract void | Rename (string Name) |
Renames the directory More... | |
override string | ToString () |
Gets info for the directory More... | |
Static Public Member Functions | |
static bool | operator!= (DirectoryBase< InternalDirectoryType, DirectoryType > Directory1, IDirectory Directory2) |
Determines if two directories are not equal More... | |
static bool | operator< (DirectoryBase< InternalDirectoryType, DirectoryType > Directory1, IDirectory Directory2) |
Less than More... | |
static bool | operator<= (DirectoryBase< InternalDirectoryType, DirectoryType > Directory1, IDirectory Directory2) |
Less than or equal More... | |
static bool | operator== (DirectoryBase< InternalDirectoryType, DirectoryType > Directory1, IDirectory Directory2) |
Determines if two directories are equal More... | |
static bool | operator> (DirectoryBase< InternalDirectoryType, DirectoryType > Directory1, IDirectory Directory2) |
Greater than More... | |
static bool | operator>= (DirectoryBase< InternalDirectoryType, DirectoryType > Directory1, IDirectory Directory2) |
Greater than or equal More... | |
Protected Member Functions | |
DirectoryBase () | |
Constructor More... | |
DirectoryBase (InternalDirectoryType InternalDirectory, string UserName="", string Password="", string Domain="") | |
Constructor More... | |
Properties | |
abstract DateTime | Accessed [get] |
Last time accessed (UTC time) More... | |
abstract DateTime | Created [get] |
Date created (UTC time) More... | |
abstract bool | Exists [get] |
Does it exist? More... | |
abstract string | FullName [get] |
Full path More... | |
abstract DateTime | Modified [get] |
Date modified (UTC time) More... | |
abstract string | Name [get] |
Name More... | |
abstract IDirectory | Parent [get] |
Parent directory More... | |
abstract IDirectory | Root [get] |
Root directory More... | |
abstract long | Size [get] |
Size of the directory More... | |
string | Domain [get, set] |
Domain More... | |
InternalDirectoryType | InternalDirectory [get, set] |
Internal directory More... | |
string | Password [get, set] |
Password More... | |
string | UserName [get, set] |
User name 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... | |
Directory base class
InternalDirectoryType | Data type internally to hold true directory info |
DirectoryType | Directory type |
DirectoryType | : | DirectoryBase | |
DirectoryType | : | InternalDirectoryType | |
DirectoryType | : | DirectoryType | |
DirectoryType | : | new() |
Definition at line 38 of file DirectoryBase.cs.
|
protected |
Constructor
Definition at line 44 of file DirectoryBase.cs.
|
protected |
Constructor
InternalDirectory | Internal directory object |
Domain | Domain of the user (optional) |
Password | Password to be used to access the file (optional) |
UserName | User name to be used to access the file (optional) |
Definition at line 55 of file DirectoryBase.cs.
object Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.Clone | ( | ) |
Clones the directory object
Definition at line 210 of file DirectoryBase.cs.
int Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.CompareTo | ( | IDirectory | other | ) |
Compares this to another directory
other | Directory to compare to |
Definition at line 225 of file DirectoryBase.cs.
int Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.CompareTo | ( | object | obj | ) |
Compares this object to another object
obj | Object to compare it to |
Definition at line 239 of file DirectoryBase.cs.
|
virtual |
Copies the directory to the specified parent directory
Directory | Directory to copy to |
Options | Copy options |
Implements Utilities.IO.FileSystem.Interfaces.IDirectory.
Definition at line 253 of file DirectoryBase.cs.
|
pure virtual |
Creates the directory
Implements Utilities.IO.FileSystem.Interfaces.IDirectory.
Implemented in Utilities.IO.FileSystem.Default.LocalDirectory.
|
pure virtual |
Deletes the directory
Implements Utilities.IO.FileSystem.Interfaces.IDirectory.
Implemented in Utilities.IO.FileSystem.Default.LocalDirectory.
|
pure virtual |
Enumerates directories under this directory
SearchPattern | Search pattern |
Options | Search options |
Implements Utilities.IO.FileSystem.Interfaces.IDirectory.
Implemented in Utilities.IO.FileSystem.Default.LocalDirectory.
IEnumerable<IDirectory> Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.EnumerateDirectories | ( | Predicate< IDirectory > | Predicate, |
SearchOption | Options = SearchOption.TopDirectoryOnly |
||
) |
Enumerates sub directories (defaults to top level sub directories)
Predicate | Predicate used to filter directories |
Options | Search options to use |
Implements Utilities.IO.FileSystem.Interfaces.IDirectory.
Definition at line 312 of file DirectoryBase.cs.
|
pure virtual |
Enumerates files under this directory
SearchPattern | Search pattern |
Options | Search options |
Implements Utilities.IO.FileSystem.Interfaces.IDirectory.
Implemented in Utilities.IO.FileSystem.Default.LocalDirectory.
IEnumerable<IFile> Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.EnumerateFiles | ( | Predicate< IFile > | Predicate, |
SearchOption | Options = SearchOption.TopDirectoryOnly |
||
) |
Enumerates files within the directory (defaults to top level directory and not the sub directories)
Predicate | Predicate used to filter files |
Options | Search options to use |
Implements Utilities.IO.FileSystem.Interfaces.IDirectory.
Definition at line 331 of file DirectoryBase.cs.
override bool Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.Equals | ( | object | obj | ) |
Determines if the two directories are the same
obj | Object to compare to |
Definition at line 341 of file DirectoryBase.cs.
bool Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.Equals | ( | IDirectory | other | ) |
Determines if the directories are equal
other | Other directory |
Definition at line 352 of file DirectoryBase.cs.
IEnumerator<IFile> Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.GetEnumerator | ( | ) |
Enumerates the files in the directory
Definition at line 363 of file DirectoryBase.cs.
override int Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.GetHashCode | ( | ) |
Returns the hash code for the directory
Definition at line 373 of file DirectoryBase.cs.
|
virtual |
Moves this directory under another directory
Directory | Directory to move to |
Implements Utilities.IO.FileSystem.Interfaces.IDirectory.
Definition at line 382 of file DirectoryBase.cs.
|
static |
Determines if two directories are not equal
Directory1 | Directory 1 |
Directory2 | Directory 2 |
Definition at line 134 of file DirectoryBase.cs.
|
static |
Less than
Directory1 | Directory 1 |
Directory2 | Directory 2 |
Definition at line 145 of file DirectoryBase.cs.
|
static |
Less than or equal
Directory1 | Directory 1 |
Directory2 | Directory 2 |
Definition at line 158 of file DirectoryBase.cs.
|
static |
Determines if two directories are equal
Directory1 | Directory 1 |
Directory2 | Directory 2 |
Definition at line 171 of file DirectoryBase.cs.
|
static |
Greater than
Directory1 | Directory 1 |
Directory2 | Directory 2 |
Definition at line 186 of file DirectoryBase.cs.
|
static |
Greater than or equal
Directory1 | Directory 1 |
Directory2 | Directory 2 |
Definition at line 199 of file DirectoryBase.cs.
|
pure virtual |
Renames the directory
Name | Name of the new directory |
Implements Utilities.IO.FileSystem.Interfaces.IDirectory.
Implemented in Utilities.IO.FileSystem.Default.LocalDirectory.
override string Utilities.IO.FileSystem.BaseClasses.DirectoryBase< InternalDirectoryType, DirectoryType >.ToString | ( | ) |
Gets info for the directory
Definition at line 409 of file DirectoryBase.cs.
|
get |
Last time accessed (UTC time)
Definition at line 66 of file DirectoryBase.cs.
|
get |
Date created (UTC time)
Definition at line 71 of file DirectoryBase.cs.
|
getsetprotected |
Domain
Definition at line 111 of file DirectoryBase.cs.
|
get |
Does it exist?
Definition at line 76 of file DirectoryBase.cs.
|
get |
Full path
Definition at line 81 of file DirectoryBase.cs.
|
getsetprotected |
Internal directory
Definition at line 116 of file DirectoryBase.cs.
|
get |
Date modified (UTC time)
Definition at line 86 of file DirectoryBase.cs.
|
get |
Name
Definition at line 91 of file DirectoryBase.cs.
|
get |
Parent directory
Definition at line 96 of file DirectoryBase.cs.
|
getsetprotected |
Password
Definition at line 121 of file DirectoryBase.cs.
|
get |
Root directory
Definition at line 101 of file DirectoryBase.cs.
|
get |
Size of the directory
Definition at line 106 of file DirectoryBase.cs.
|
getsetprotected |
User name
Definition at line 126 of file DirectoryBase.cs.