Provides methods for manipulating files. This is a static type with no instance services. You should never create instances of it by any means.
More...
|
static ASPOSECPP_SHARED_API void | AppendAllLines (const String &path, const SharedPtr< Collections::Generic::IEnumerable< String >> &contents, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked()) |
| Appends strings from the specified collection of strings to the specified file using the specified encoding by writing each string in a new line. If the specified file does not exist, it is created. The file is closed after writing all strings. More...
|
|
static ASPOSECPP_SHARED_API void | AppendAllText (const String &path, const String &contents, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked()) |
| Appends the specified string to the specified file using the specified encoding. More...
|
|
static ASPOSECPP_SHARED_API StreamWriterPtr | AppendText (const String &path) |
| Creates a StreamWriter object that appends text to the specified file using UTF-8 encoding. If the specified file does not exist, it is created. More...
|
|
static ASPOSECPP_SHARED_API void | Copy (const String &sourceFileName, const String &destFileName, bool overwrite=false) |
| Copies the specified file to the specified location. If the destination file already exists, a parameter specifies if it should be overwritten. More...
|
|
static ASPOSECPP_SHARED_API FileStreamPtr | Create (const String &path, int32_t bufferSize=DefaultBufferSize, FileOptions options=FileOptions::None) |
| Creates a new file (or overwrites existing) and opens it for reading and writing access using the specified buffer size and options. More...
|
|
static ASPOSECPP_SHARED_API StreamWriterPtr | CreateText (const String &path) |
| Creates a new or opens existing file for writing UTF-8 encoded text. More...
|
|
static ASPOSECPP_SHARED_API void | Decrypt (const String &path) |
| NOT IMPLEMENTED. More...
|
|
static ASPOSECPP_SHARED_API void | Delete (const String &path) |
| Deletes the specified file or directory. More...
|
|
static ASPOSECPP_SHARED_API void | Encrypt (const String &path) |
| NOT IMPLEMENTED. More...
|
|
static ASPOSECPP_SHARED_API bool | Exists (const String &path) |
| Determines if the specified path references an existing file. More...
|
|
static ASPOSECPP_SHARED_API FileAttributes | GetAttributes (const String &path) |
| Returns the attributes of the specified entity. More...
|
|
static ASPOSECPP_SHARED_API DateTime | GetCreationTime (const String &path) |
| Returns the creation time of the specified entity as local time. More...
|
|
static ASPOSECPP_SHARED_API DateTime | GetCreationTimeUtc (const String &path) |
| Returns the creation time of the specified entity as UTC time. More...
|
|
static ASPOSECPP_SHARED_API DateTime | GetLastAccessTime (const String &path) |
| Returns the last access time of the specified entity as local time. More...
|
|
static ASPOSECPP_SHARED_API DateTime | GetLastAccessTimeUtc (const String &path) |
| Returns the last access time of the specified entity as UTC time. More...
|
|
static ASPOSECPP_SHARED_API DateTime | GetLastWriteTime (const String &path) |
| Returns the last write time of the specified entity as local time. More...
|
|
static ASPOSECPP_SHARED_API DateTime | GetLastWriteTimeUtc (const String &path) |
| Returns the last write time of the specified entity as UTC time. More...
|
|
static ASPOSECPP_SHARED_API void | Move (const String &sourceFileName, const String &destFileName) |
| Moves the specified file to the new location. More...
|
|
static ASPOSECPP_SHARED_API FileStreamPtr | Open (const String &path, FileMode mode) |
| Opens the specified file in the specified mode for reading and writing and with no sharing. More...
|
|
static ASPOSECPP_SHARED_API FileStreamPtr | Open (const String &path, FileMode mode, FileAccess access, FileShare share=FileShare::None) |
| Opens the specified file in the specified mode, with the specified access type and sharing option. More...
|
|
static ASPOSECPP_SHARED_API FileStreamPtr | OpenRead (const String &path) |
| Opens the specified file for reading only, in 'Open' mode with shared access for reading. More...
|
|
static ASPOSECPP_SHARED_API StreamReaderPtr | OpenText (const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked()) |
| Opens the specified existing file for reading text using UTF-8 encoding with no sharing. More...
|
|
static ASPOSECPP_SHARED_API FileStreamPtr | OpenWrite (const String &path) |
| Opens the specified file for writing only, in 'OpenOrCreate' mode with no sharing. More...
|
|
static ASPOSECPP_SHARED_API ArrayPtr< uint8_t > | ReadAllBytes (const String &path) |
| Reads the content of the specified binary file to a byte array. More...
|
|
static ASPOSECPP_SHARED_API ArrayPtr< String > | ReadAllLines (const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8()) |
| Reads the content of the specified text file line by line to an array of strings using the specified character encoding. More...
|
|
static ASPOSECPP_SHARED_API String | ReadAllText (const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8()) |
| Reads the content of the specified text file to a single String object using the specified character encoding. More...
|
|
static ASPOSECPP_SHARED_API SharedPtr< Collections::Generic::IEnumerable< String > > | ReadLines (const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8()) |
| Reads the content of the specified text file line by line using the specified character encoding and returns enumerable collection of strings each of which represents a single line of the file's content. More...
|
|
static ASPOSECPP_SHARED_API void | Replace (const String &sourceFileName, const String &destinationFileName, const String &destinationBackupFileName, bool ignoreMetadataErrors=true) |
| Replaces the contents of a one file with another and creates a backup of the replaced file. More...
|
|
static ASPOSECPP_SHARED_API void | SetAttributes (const String &path, FileAttributes fileAttributes) |
| Sets the specified attributes on the specified file. More...
|
|
static ASPOSECPP_SHARED_API void | SetCreationTime (const String &path, DateTime creationTime) |
| NOT IMPLEMENTED. More...
|
|
static ASPOSECPP_SHARED_API void | SetCreationTimeUtc (const String &path, DateTime creationTimeUtc) |
| NOT IMPLEMENTED. More...
|
|
static ASPOSECPP_SHARED_API void | SetLastWriteTime (const String &path, DateTime lastWriteTime) |
| Sets the last write time of the specified entity as local time. More...
|
|
static ASPOSECPP_SHARED_API void | SetLastWriteTimeUtc (const String &path, DateTime lastWriteTimeUtc) |
| Sets the last write time of the specified entity as UTC time. More...
|
|
static ASPOSECPP_SHARED_API void | SetLastAccessTime (const String &path, DateTime lastWriteTime) |
| NOT IMPLEMENTED. More...
|
|
static ASPOSECPP_SHARED_API void | SetLastAccessTimeUtc (const String &path, DateTime lastWriteTimeUtc) |
| NOT IMPLEMENTED. More...
|
|
static ASPOSECPP_SHARED_API void | WriteAllBytes (const String &path, const ArrayPtr< uint8_t > &bytes) |
| Overwrites the specified binary file and writes the specified bytes to it. More...
|
|
static ASPOSECPP_SHARED_API void | WriteAllLines (const String &path, const SharedPtr< Collections::Generic::IEnumerable< String >> &contents, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked()) |
| Creates a new text file or overwrites the existing one and writes all strings from the specified enumerable collection of strings to it, each string on a new line, using the specified encoding. More...
|
|
static ASPOSECPP_SHARED_API void | WriteAllLines (const String &path, const ArrayPtr< String > &contents, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked()) |
| Creates a new text file or overwrites the existing one and writes all strings from the specified array of strings to it, each string on a new line, using the specified encoding. More...
|
|
static ASPOSECPP_SHARED_API void | WriteAllText (const String &path, const String &contents, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked()) |
| Creates a new text file or overwrites the existing one and writes the content of the specified string to it using the specified encoding. More...
|
|
Provides methods for manipulating files. This is a static type with no instance services. You should never create instances of it by any means.