Click or drag to resize
File Class
Implementation of File class for Amazon S3.
Inheritance Hierarchy

Namespace: CMS.AmazonStorage
Assembly: CMS.AmazonStorage (in CMS.AmazonStorage.dll) Version: 10.0.0
Syntax
C#
public class File : AbstractFile

The File type exposes the following members.

Constructors
  NameDescription
Public methodFile
Top
Properties
  NameDescription
Public propertyStatic memberProvider
Get or set S3ObjectInfoProvider.
Top
Methods
  NameDescription
Public methodAppendAllText(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).)
Public methodAppendAllText(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).)
Public methodCopy(String, String)
Copies an existing file to a new file. Overwriting a file of the same name is not allowed.
(Overrides AbstractFileCopy(String, String).)
Public methodCopy(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).)
Public methodCreate
Creates or overwrites a file in the specified path.
(Overrides AbstractFileCreate(String).)
Public methodCreateText
Creates or opens a file for writing UTF-8 encoded text.
(Overrides AbstractFileCreateText(String).)
Public methodDelete
Deletes the specified file. An exception is not thrown if the specified file does not exist.
(Overrides AbstractFileDelete(String).)
Public methodExists
Determines whether the specified file exists.
(Overrides AbstractFileExists(String).)
Protected methodExistsInFileSystem
Returns whether given file exist in file system.
Public methodGetAccessControl
Gets a FileSecurity object that encapsulates the access control list (ACL) entries for a specified directory.
(Overrides AbstractFileGetAccessControl(String).)
Protected methodGetFileStream(String, FileMode)
Returns new instance of FileStream class.
Protected methodGetFileStream(String, FileMode, FileAccess)
Returns new instance of FileStream class.
Public methodGetFileUrl
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).)
Protected methodGetHashString
Returns Hashed string from specified query string. Hashed string is not user specific.
Public methodGetLastWriteTime
Returns the date and time the specified file or directory was last written to.
(Overrides AbstractFileGetLastWriteTime(String).)
Public methodMove
Moves a specified file to a new location, providing the option to specify a new file name.
(Overrides AbstractFileMove(String, String).)
Public methodOpen
Opens a FileStream on the specified path, with the specified mode and access.
(Overrides AbstractFileOpen(String, FileMode, FileAccess).)
Public methodOpenRead
Opens an existing file for reading.
(Overrides AbstractFileOpenRead(String).)
Public methodOpenText
Opens an existing UTF-8 encoded text file for reading.
(Overrides AbstractFileOpenText(String).)
Public methodReadAllBytes
Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
(Overrides AbstractFileReadAllBytes(String).)
Public methodReadAllText(String)
Opens a text file, reads all lines of the file, and then closes the file.
(Overrides AbstractFileReadAllText(String).)
Public methodReadAllText(String, Encoding)
Opens a text file, reads all lines of the file, and then closes the file.
(Overrides AbstractFileReadAllText(String, Encoding).)
Protected methodResolveUrl
Returns resolved URL.
Public methodSetAttributes
Sets the specified FileAttributes of the file on the specified path.
(Overrides AbstractFileSetAttributes(String, FileAttributes).)
Public methodSetLastWriteTime
Sets the date and time that the specified file was last written to.
(Overrides AbstractFileSetLastWriteTime(String, DateTime).)
Public methodSetLastWriteTimeUtc
Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.
(Overrides AbstractFileSetLastWriteTimeUtc(String, DateTime).)
Public methodWriteAllBytes
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).)
Public methodWriteAllText(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).)
Public methodWriteAllText(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).)
Top
See Also