File MembersKentico 8.0 API Reference
The File type exposes the following members.
Methods

  NameDescription
Public methodStatic memberAppendAllText(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.
Public methodStatic memberAppendAllText(String, String, Boolean)
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.
Public methodStatic memberAppendAllText(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.
Public methodStatic memberAppendAllText(String, String, Encoding, Boolean)
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.
Public methodStatic memberCopy(String, String)
Copies an existing file to a new file.
Public methodStatic memberCopy(String, String, Boolean)
Copies an existing file to a new file. Overwriting a file of the same name is allowed.
Public methodStatic memberCreate
Creates or overwrites a file in the specified path.
Public methodStatic memberCreateText
Creates or opens a file for writing UTF-8 encoded text.
Public methodStatic memberDelete
Deletes the specified file. An exception is not thrown if the specified file does not exist.
Public methodStatic memberExists
Determines whether the specified file exists.
Public methodStatic memberExistsRelative
Determines whether the specified file exists.
Public methodStatic memberGetAccessControl
Gets a FileSecurity object that encapsulates the access control list (ACL) entries for a specified directory.
Public methodStatic memberGetActualUrlObsolete.
Returns actual URL of given absolute path.
Public methodStatic memberGetFileObject
Gets the file provider object for given path
Public methodStatic memberGetFileUrl
Returns URL to file. If can be accessed directly then direct URL is generated else URL with GetFile page is generated.
Public methodStatic memberGetLastWriteTime
Returns the date and time the specified file or directory was last written to.
Public methodStatic memberMove
Moves a specified file to a new location, providing the option to specify a new file name.
Public methodStatic memberOpen
Opens a FileStream on the specified path, with the specified mode and access.
Public methodStatic memberOpenRead
Opens an existing file for reading.
Public methodStatic memberOpenText
Opens an existing UTF-8 encoded text file for reading.
Public methodStatic memberReadAllBytes
Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
Public methodStatic memberReadAllText(String)
Opens a text file, reads all lines of the file, and then closes the file.
Public methodStatic memberReadAllText(String, Encoding)
Opens a text file, reads all lines of the file, and then closes the file.
Public methodStatic memberSetAttributes
Sets the specified FileAttributes of the file on the specified path.
Public methodStatic memberSetLastWriteTime
Sets the date and time that the specified file was last written to.
Public methodStatic memberSetLastWriteTimeUtc
Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.
Public methodStatic memberWriteAllBytes
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.
Public methodStatic memberWriteAllText(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.
Public methodStatic memberWriteAllText(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.
Back to Top
See Also