Interface IIOManager
Interface for I/O managers.
Namespace: Evergine.Common.IO
Assembly: Evergine.Common.dll
Syntax
public interface IIOManager
Properties
Location
Gets or sets the location.
Declaration
string Location { get; set; }
Property Value
Type | Description |
---|---|
string | The location. |
Methods
CreateDirectory(string)
Creates a directory.
Declaration
void CreateDirectory(string directoryName)
Parameters
Type | Name | Description |
---|---|---|
string | directoryName | The name of the directory. |
CreateStorageFile(string)
Creates the storage file.
Declaration
Stream CreateStorageFile(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file path. |
Returns
Type | Description |
---|---|
Stream | The result. |
DeleteDirectory(string)
Deletes the directory.
Declaration
void DeleteDirectory(string directoryName)
Parameters
Type | Name | Description |
---|---|---|
string | directoryName | The name of the directory. |
DeleteStorageFile(string)
Deletes the storage file.
Declaration
void DeleteStorageFile(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file path. |
DirectoryExists(string)
Determines if the directory exists.
Declaration
bool DirectoryExists(string directoryName)
Parameters
Type | Name | Description |
---|---|---|
string | directoryName | Name of the directory. |
Returns
Type | Description |
---|---|
bool | The result. |
ExistsContentFile(string)
Determines whether the specified file exists.
Declaration
bool ExistsContentFile(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
bool | true if the file exists. |
ExistsStorageFile(string)
Checks if the storage file exists.
Declaration
bool ExistsStorageFile(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path to the file. |
Returns
Type | Description |
---|---|
bool | The result. |
GetContentDirectories(string)
Gets the directory names under this content path.
Declaration
string[] GetContentDirectories(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
string[] | A list of the existing directories under this content path. |
GetContentFileNames(string)
Gets the file names under this content path.
Declaration
string[] GetContentFileNames(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
Returns
Type | Description |
---|---|
string[] | A list of existing files under this path. |
GetCreationTime(string)
Gets the creation time.
Declaration
DateTimeOffset GetCreationTime(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file path. |
Returns
Type | Description |
---|---|
DateTimeOffset | The creation time. |
GetDirectoryNames(string)
Gets the directory names.
Declaration
string[] GetDirectoryNames(string searchPattern)
Parameters
Type | Name | Description |
---|---|---|
string | searchPattern | The search pattern. |
Returns
Type | Description |
---|---|
string[] | The result. |
GetFileNames(string)
Gets the file names.
Declaration
string[] GetFileNames(string searchPattern)
Parameters
Type | Name | Description |
---|---|---|
string | searchPattern | The search pattern. |
Returns
Type | Description |
---|---|
string[] | The results. |
GetRGBABytes(Stream, out int, out int)
Gets the RGBA bytes from an image stream.
Declaration
byte[] GetRGBABytes(Stream imageStream, out int imageWidth, out int imageHeight)
Parameters
Type | Name | Description |
---|---|---|
Stream | imageStream | The source image stream. |
int | imageWidth | The width of the image in pixels. |
int | imageHeight | The height of the image in pixels. |
Returns
Type | Description |
---|---|
byte[] | An array containing the premultiplied RGBA bytes of the raw image. |
MoveStorageFile(string, string)
Moves the storage file.
Declaration
void MoveStorageFile(string oldPath, string newPath)
Parameters
Type | Name | Description |
---|---|---|
string | oldPath | The previous path. |
string | newPath | The new path. |
OpenContentFile(string)
Opens the contents of the file.
Declaration
Stream OpenContentFile(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file path. |
Returns
Type | Description |
---|---|
Stream | The result. |
OpenStorageFile(string, FileMode)
Opens the storage file.
Declaration
Stream OpenStorageFile(string path, FileMode mode)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file path. |
FileMode | mode | The file mode. |
Returns
Type | Description |
---|---|
Stream | Returns the result of the operation. |
OpenStorageFile(string, FileMode, FileAccess)
Opens the storage file.
Declaration
Stream OpenStorageFile(string path, FileMode mode, FileAccess access)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file path. |
FileMode | mode | The file mode. |
FileAccess | access | The file access level. |
Returns
Type | Description |
---|---|
Stream | The result of the operation. |
SavePictureToLibrary(string)
Saves the picture to the library.
Declaration
void SavePictureToLibrary(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path. |
SavePictureToLibrary(string, Stream)
Saves the picture to the library.
Declaration
void SavePictureToLibrary(string fileName, Stream fileStream)
Parameters
Type | Name | Description |
---|---|---|
string | fileName | The name of the file. |
Stream | fileStream | The file stream. |