Craig's Utility Library
4.0 Beta
|
Basic local file class More...
Public Member Functions | |
LocalFile () | |
Constructor More... | |
LocalFile (string Path) | |
Constructor More... | |
LocalFile (System.IO.FileInfo File) | |
Constructor More... | |
override IFile | CopyTo (IDirectory Directory, bool Overwrite) |
Copies the file to another directory More... | |
override string | Delete () |
Deletes the file More... | |
override void | MoveTo (IDirectory Directory) |
Moves the file to a new directory More... | |
override string | Read () |
Reads the file in as a string More... | |
override byte[] | ReadBinary () |
Reads a file as binary More... | |
override void | Rename (string NewName) |
Renames the file More... | |
override string | Write (string Content, System.IO.FileMode Mode=FileMode.Create, Encoding Encoding=null) |
Writes content to the file More... | |
override byte[] | Write (byte[] Content, System.IO.FileMode Mode=FileMode.Create) |
Writes content to the file More... | |
Public Member Functions inherited from Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile > | |
object | Clone () |
Clones the file object More... | |
int | CompareTo (IFile other) |
Compares this to another file More... | |
int | CompareTo (object obj) |
Compares this object to another object More... | |
abstract IFile | CopyTo (IDirectory Directory, bool Overwrite) |
Copies the file to another directory More... | |
override bool | Equals (object obj) |
Determines if the objects are equal More... | |
bool | Equals (IFile other) |
Determines if the files are equal More... | |
override int | GetHashCode () |
Gets the hash code for the file More... | |
abstract void | MoveTo (IDirectory Directory) |
Moves the file to a new directory More... | |
override string | ToString () |
Returns the name of the file More... | |
Properties | |
override DateTime | Accessed [get] |
Last time accessed (UTC time) More... | |
override DateTime | Created [get] |
Time created (UTC time) More... | |
override IDirectory | Directory [get] |
Directory the file is within More... | |
override bool | Exists [get] |
Does the file exist? More... | |
override string | Extension [get] |
File extension More... | |
override string | FullName [get] |
Full path More... | |
override long | Length [get] |
Size of the file More... | |
override DateTime | Modified [get] |
Time modified (UTC time) More... | |
override string | Name [get] |
Name of the file More... | |
Properties inherited from Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile > | |
abstract DateTime | Accessed [get] |
Last time accessed (UTC time) More... | |
abstract DateTime | Created [get] |
Time created (UTC time) More... | |
abstract IDirectory | Directory [get] |
Directory the file is within More... | |
abstract bool | Exists [get] |
Does the file exist? More... | |
abstract string | Extension [get] |
File extension More... | |
abstract string | FullName [get] |
Full path More... | |
abstract long | Length [get] |
Size of the file More... | |
abstract DateTime | Modified [get] |
Time modified (UTC time) More... | |
abstract string | Name [get] |
Name of the file More... | |
string | Domain [get, set] |
Domain of the user More... | |
InternalFileType | InternalFile [get, set] |
Internal directory More... | |
string | Password [get, set] |
Password More... | |
string | UserName [get, set] |
User name used More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile > | |
static implicit | operator byte[] (FileBase< InternalFileType, FileType > File) |
Reads the file and converts it to a byte array More... | |
static implicit | operator string (FileBase< InternalFileType, FileType > File) |
Reads the file and converts it to a string More... | |
static bool | operator!= (FileBase< InternalFileType, FileType > File1, IFile File2) |
Determines if two directories are not equal More... | |
static bool | operator< (FileBase< InternalFileType, FileType > File1, IFile File2) |
Less than More... | |
static bool | operator<= (FileBase< InternalFileType, FileType > File1, IFile File2) |
Less than or equal More... | |
static bool | operator== (FileBase< InternalFileType, FileType > File1, IFile File2) |
Determines if two directories are equal More... | |
static bool | operator> (FileBase< InternalFileType, FileType > File1, IFile File2) |
Greater than More... | |
static bool | operator>= (FileBase< InternalFileType, FileType > File1, IFile File2) |
Greater than or equal More... | |
Protected Member Functions inherited from Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile > | |
FileBase () | |
Constructor More... | |
FileBase (InternalFileType InternalFile) | |
Constructor More... | |
FileBase (InternalFileType InternalFile, string UserName, string Password, string Domain) | |
Constructor More... | |
Basic local file class
Definition at line 34 of file LocalFile.cs.
Utilities.IO.FileSystem.Default.LocalFile.LocalFile | ( | ) |
Constructor
Definition at line 39 of file LocalFile.cs.
Utilities.IO.FileSystem.Default.LocalFile.LocalFile | ( | string | Path | ) |
Utilities.IO.FileSystem.Default.LocalFile.LocalFile | ( | System.IO.FileInfo | File | ) |
override IFile Utilities.IO.FileSystem.Default.LocalFile.CopyTo | ( | IDirectory | Directory, |
bool | Overwrite | ||
) |
Copies the file to another directory
Directory | Directory to copy the file to |
Overwrite | Should the file overwrite another file if found |
Definition at line 139 of file LocalFile.cs.
|
virtual |
Deletes the file
Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.
Definition at line 157 of file LocalFile.cs.
override void Utilities.IO.FileSystem.Default.LocalFile.MoveTo | ( | IDirectory | Directory | ) |
Moves the file to a new directory
Directory | Directory to move to |
Definition at line 170 of file LocalFile.cs.
|
virtual |
Reads the file in as a string
Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.
Definition at line 183 of file LocalFile.cs.
|
virtual |
Reads a file as binary
Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.
Definition at line 197 of file LocalFile.cs.
|
virtual |
Renames the file
NewName | New name for the file |
Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.
Definition at line 221 of file LocalFile.cs.
|
virtual |
Writes content to the file
Content | Content to write |
Mode | Mode to open the file as |
Encoding | Encoding to use for the content |
Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.
Definition at line 236 of file LocalFile.cs.
|
virtual |
Writes content to the file
Content | Content to write |
Mode | Mode to open the file as |
Implements Utilities.IO.FileSystem.BaseClasses.FileBase< System.IO.FileInfo, LocalFile >.
Definition at line 251 of file LocalFile.cs.
|
get |
Last time accessed (UTC time)
Definition at line 65 of file LocalFile.cs.
|
get |
Time created (UTC time)
Definition at line 73 of file LocalFile.cs.
|
get |
Directory the file is within
Definition at line 81 of file LocalFile.cs.
|
get |
Does the file exist?
Definition at line 89 of file LocalFile.cs.
|
get |
File extension
Definition at line 97 of file LocalFile.cs.
|
get |
Full path
Definition at line 105 of file LocalFile.cs.
|
get |
Size of the file
Definition at line 113 of file LocalFile.cs.
|
get |
Time modified (UTC time)
Definition at line 121 of file LocalFile.cs.
|
get |
Name of the file
Definition at line 129 of file LocalFile.cs.