Craig's Utility Library
4.0 Beta
|
Directory base class More...
Public Member Functions | |
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... | |
abstract string | Delete () |
Deletes the file 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... | |
abstract string | Read () |
Reads the file in as a string More... | |
abstract byte[] | ReadBinary () |
Reads a file as binary More... | |
abstract void | Rename (string NewName) |
Renames the file More... | |
override string | ToString () |
Returns the name of the file More... | |
abstract string | Write (string Content, System.IO.FileMode Mode=FileMode.Create, Encoding Encoding=null) |
Writes content to the file More... | |
abstract byte[] | Write (byte[] Content, System.IO.FileMode Mode=FileMode.Create) |
Writes content to the file More... | |
Public Member Functions inherited from Utilities.IO.FileSystem.Interfaces.IFile | |
string | Write (string Content, FileMode Mode=FileMode.Create, Encoding Encoding=null) |
Writes content to the file More... | |
byte[] | Write (byte[] Content, FileMode Mode=FileMode.Create) |
Writes content to the file More... | |
Static Public Member Functions | |
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 | |
FileBase () | |
Constructor More... | |
FileBase (InternalFileType InternalFile) | |
Constructor More... | |
FileBase (InternalFileType InternalFile, string UserName, string Password, string Domain) | |
Constructor More... | |
Properties | |
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... | |
Properties inherited from Utilities.IO.FileSystem.Interfaces.IFile | |
DateTime | Accessed [get] |
Last time the file was accessed More... | |
DateTime | Created [get] |
When the file was created More... | |
IDirectory | Directory [get] |
Directory the file is in More... | |
bool | Exists [get] |
Does the file exist currently More... | |
string | Extension [get] |
File extension More... | |
string | FullName [get] |
Full path to the file More... | |
long | Length [get] |
Size of the file in bytes More... | |
DateTime | Modified [get] |
When the file was last modified More... | |
string | Name [get] |
File name More... | |
Directory base class
FileType | File type |
InternalFileType | Internal file type |
FileType | : | FileBase | |
FileType | : | InternalFileType | |
FileType | : | FileType | |
FileType | : | new() |
Definition at line 34 of file FileBase.cs.
|
protected |
Constructor
Definition at line 40 of file FileBase.cs.
|
protected |
|
protected |
Constructor
InternalFile | Internal file |
UserName | User name |
Password | Password |
Domain | User's domain |
Definition at line 61 of file FileBase.cs.
object Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.Clone | ( | ) |
int Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.CompareTo | ( | IFile | other | ) |
Compares this to another file
other | File to compare to |
Definition at line 255 of file FileBase.cs.
int Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.CompareTo | ( | object | obj | ) |
Compares this object to another object
obj | Object to compare it to |
Definition at line 267 of file FileBase.cs.
|
pure virtual |
Copies the file to another directory
Directory | Directory to copy the file to |
Overwrite | Should the file overwrite another file if found |
Implements Utilities.IO.FileSystem.Interfaces.IFile.
|
pure virtual |
Deletes the file
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Implemented in Utilities.IO.FileSystem.Default.FtpFile, Utilities.IO.FileSystem.Default.WebFile, and Utilities.IO.FileSystem.Default.LocalFile.
override bool Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.Equals | ( | object | obj | ) |
Determines if the objects are equal
obj | Object to compare to |
Definition at line 294 of file FileBase.cs.
bool Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.Equals | ( | IFile | other | ) |
Determines if the files are equal
other | Other file |
Definition at line 305 of file FileBase.cs.
override int Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.GetHashCode | ( | ) |
|
pure virtual |
Moves the file to a new directory
Directory | Directory to move to |
Implements Utilities.IO.FileSystem.Interfaces.IFile.
|
static |
Reads the file and converts it to a byte array
File | File to read |
Definition at line 139 of file FileBase.cs.
|
static |
Reads the file and converts it to a string
File | File to read |
Definition at line 151 of file FileBase.cs.
|
static |
Determines if two directories are not equal
File1 | File 1 |
File2 | File 2 |
Definition at line 164 of file FileBase.cs.
|
static |
Less than
File1 | File 1 |
File2 | File 2 |
Definition at line 175 of file FileBase.cs.
|
static |
Less than or equal
File1 | File 1 |
File2 | File 2 |
Definition at line 188 of file FileBase.cs.
|
static |
Determines if two directories are equal
File1 | File 1 |
File2 | File 2 |
Definition at line 201 of file FileBase.cs.
|
static |
Greater than
File1 | File 1 |
File2 | File 2 |
Definition at line 216 of file FileBase.cs.
|
static |
Greater than or equal
File1 | File 1 |
File2 | File 2 |
Definition at line 229 of file FileBase.cs.
|
pure virtual |
Reads the file in as a string
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Implemented in Utilities.IO.FileSystem.Default.WebFile, Utilities.IO.FileSystem.Default.FtpFile, and Utilities.IO.FileSystem.Default.LocalFile.
|
pure virtual |
Reads a file as binary
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Implemented in Utilities.IO.FileSystem.Default.WebFile, Utilities.IO.FileSystem.Default.FtpFile, and Utilities.IO.FileSystem.Default.LocalFile.
|
pure virtual |
Renames the file
NewName | New name for the file |
Implements Utilities.IO.FileSystem.Interfaces.IFile.
Implemented in Utilities.IO.FileSystem.Default.LocalFile, Utilities.IO.FileSystem.Default.WebFile, and Utilities.IO.FileSystem.Default.FtpFile.
override string Utilities.IO.FileSystem.BaseClasses.FileBase< InternalFileType, FileType >.ToString | ( | ) |
Returns the name of the file
Definition at line 349 of file FileBase.cs.
|
pure virtual |
Writes content to the file
Content | Content to write |
Mode | Mode to open the file as |
Encoding | Encoding to use for the content |
Implemented in Utilities.IO.FileSystem.Default.LocalFile, Utilities.IO.FileSystem.Default.WebFile, and Utilities.IO.FileSystem.Default.FtpFile.
|
pure virtual |
Writes content to the file
Content | Content to write |
Mode | Mode to open the file as |
Implemented in Utilities.IO.FileSystem.Default.WebFile, Utilities.IO.FileSystem.Default.LocalFile, and Utilities.IO.FileSystem.Default.FtpFile.
|
get |
Last time accessed (UTC time)
Definition at line 72 of file FileBase.cs.
|
get |
Time created (UTC time)
Definition at line 77 of file FileBase.cs.
|
get |
Directory the file is within
Definition at line 82 of file FileBase.cs.
|
getsetprotected |
Domain of the user
Definition at line 117 of file FileBase.cs.
|
get |
Does the file exist?
Definition at line 87 of file FileBase.cs.
|
get |
File extension
Definition at line 92 of file FileBase.cs.
|
get |
Full path
Definition at line 97 of file FileBase.cs.
|
getsetprotected |
Internal directory
Definition at line 122 of file FileBase.cs.
|
get |
Size of the file
Definition at line 102 of file FileBase.cs.
|
get |
Time modified (UTC time)
Definition at line 107 of file FileBase.cs.
|
get |
Name of the file
Definition at line 112 of file FileBase.cs.
|
getsetprotected |
Password
Definition at line 127 of file FileBase.cs.
|
getsetprotected |
User name used
Definition at line 132 of file FileBase.cs.