docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IFileOperationsImplementation

    Interface for file writer implementations

    Namespace: Unity.Logging.Sinks
    Assembly: Unity.Logging.dll
    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*, ulong, ulong*)

    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

    ulong length

    Length of the data to write

    ulong* offsetPtr

    Position in file to write to

    Returns
    Type Description
    bool

    True if write was successful

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)