Interface IFileOperationsImplementation
Interface for file writer implementations
Namespace: Unity.Logging.Sinks
Syntax
public interface IFileOperationsImplementation
Methods
CloseFile(IntPtr)
Close the file
Declaration
void CloseFile(IntPtr fileHandle)
Parameters
| Type | Name | Description |
|---|---|---|
| IntPtr | fileHandle | File handle that was returned by OpenFile(ref FixedString4096Bytes) |
FlushFile(IntPtr)
Flush file
Declaration
void FlushFile(IntPtr fileHandle)
Parameters
| Type | Name | Description |
|---|---|---|
| IntPtr | fileHandle | File handle that was returned by OpenFile(ref FixedString4096Bytes) |
OpenFile(ref FixedString4096Bytes)
Opens the file for writing
Declaration
IntPtr OpenFile(ref FixedString4096Bytes absFilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| FixedString4096Bytes | absFilePath | Absolute file path |
Returns
| Type | Description |
|---|---|
| IntPtr | File handle |
Write(IntPtr, Byte*, UInt64, UInt64*)
Writes data into the file
Declaration
bool Write(IntPtr fileHandle, byte *data, ulong length, ulong *offsetPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| IntPtr | fileHandle | File handle that was returned by OpenFile(ref FixedString4096Bytes) |
| Byte* | data | Pointer to the data to write |
| UInt64 | length | Length of the data to write |
| UInt64* | offsetPtr | Position in file to write to |
Returns
| Type | Description |
|---|---|
| Boolean | True if write was successful |