File Methods |
The File type exposes the following members.
Name | Description | |
---|---|---|
AppendAllText(String, String) |
Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file.
(Overrides AbstractFileAppendAllText(String, String).) | |
AppendAllText(String, String, Encoding) |
Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file.
(Overrides AbstractFileAppendAllText(String, String, Encoding).) | |
Copy(String, String) |
Copies an existing file to a new file. Overwriting a file of the same name is not allowed.
(Overrides AbstractFileCopy(String, String).) | |
Copy(String, String, Boolean) |
Copies an existing file to a new file. Overwriting a file of the same name is allowed.
(Overrides AbstractFileCopy(String, String, Boolean).) | |
Create |
Creates or overwrites a file in the specified path.
(Overrides AbstractFileCreate(String).) | |
CreateText |
Creates or opens a file for writing UTF-8 encoded text.
(Overrides AbstractFileCreateText(String).) | |
Delete |
Deletes the specified file. An exception is not thrown if the specified file does not exist.
(Overrides AbstractFileDelete(String).) | |
Exists |
Determines whether the specified file exists.
(Overrides AbstractFileExists(String).) | |
ExistsInFileSystem |
Returns whether given file exist in file system.
| |
GetAccessControl |
Gets a FileSecurity object that encapsulates the access control list (ACL) entries for a specified directory.
(Overrides AbstractFileGetAccessControl(String).) | |
GetFileStream(String, FileMode) |
Returns new instance of FileStream class.
| |
GetFileStream(String, FileMode, FileAccess) |
Returns new instance of FileStream class.
| |
GetFileUrl |
Returns URL to file. If can be accessed directly then direct URL is generated else URL with GetFile page is generated.
(Overrides AbstractFileGetFileUrl(String, String).) | |
GetHashString |
Returns Hashed string from specified query string. Hashed string is not user specific.
| |
GetLastWriteTime |
Returns the date and time the specified file or directory was last written to.
(Overrides AbstractFileGetLastWriteTime(String).) | |
Move |
Moves a specified file to a new location, providing the option to specify a new file name.
(Overrides AbstractFileMove(String, String).) | |
Open |
Opens a FileStream on the specified path, with the specified mode and access.
(Overrides AbstractFileOpen(String, FileMode, FileAccess).) | |
OpenRead |
Opens an existing file for reading.
(Overrides AbstractFileOpenRead(String).) | |
OpenText |
Opens an existing UTF-8 encoded text file for reading.
(Overrides AbstractFileOpenText(String).) | |
ReadAllBytes |
Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
(Overrides AbstractFileReadAllBytes(String).) | |
ReadAllText(String) |
Opens a text file, reads all lines of the file, and then closes the file.
(Overrides AbstractFileReadAllText(String).) | |
ReadAllText(String, Encoding) |
Opens a text file, reads all lines of the file, and then closes the file.
(Overrides AbstractFileReadAllText(String, Encoding).) | |
ResolveUrl |
Returns resolved URL.
| |
SetAttributes |
Sets the specified FileAttributes of the file on the specified path.
(Overrides AbstractFileSetAttributes(String, FileAttributes).) | |
SetLastWriteTime |
Sets the date and time that the specified file was last written to.
(Overrides AbstractFileSetLastWriteTime(String, DateTime).) | |
SetLastWriteTimeUtc |
Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.
(Overrides AbstractFileSetLastWriteTimeUtc(String, DateTime).) | |
WriteAllBytes |
Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten.
(Overrides AbstractFileWriteAllBytes(String, Byte).) | |
WriteAllText(String, String) |
Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.
(Overrides AbstractFileWriteAllText(String, String).) | |
WriteAllText(String, String, Encoding) |
Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.
(Overrides AbstractFileWriteAllText(String, String, Encoding).) |
Name | Description | |
---|---|---|
AsValue |
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.) | |
GetAPIString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
GetString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) | |
ToBoolean |
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDateTime |
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToDouble |
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToGuid |
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToInteger |
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.) | |
ToString |
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.) |