docs.unity3d.com
    Show / Hide Table of Contents

    Struct FileRollingLogic<T>

    Class that implements rolling logic

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Logging.Sinks
    Syntax
    [BurstCompile]
    [GenerateTestsForBurstCompatibility]
    public struct FileRollingLogic<T> : IFileOperations, IDisposable where T : IFileOperationsImplementation
    Type Parameters
    Name Description
    T

    Constructors

    FileRollingLogic(IntPtr)

    Create from a state pointer

    Declaration
    public FileRollingLogic(IntPtr pointer)
    Parameters
    Type Name Description
    IntPtr pointer

    State pointer

    Properties

    IsCreated

    True if state is not null

    Declaration
    public readonly bool IsCreated { get; }
    Property Value
    Type Description
    Boolean

    Methods

    Append(Byte*, UInt64, Boolean)

    Update state on data that is appended and writes data into the file

    Declaration
    public void Append(byte *data, ulong length, bool newLine)
    Parameters
    Type Name Description
    Byte* data

    Data to write

    UInt64 length

    Length of data to write

    Boolean newLine

    If true - newline is going to be added after the data

    Implements
    IFileOperations.Append(Byte*, UInt64, Boolean)

    Dispose()

    Dispose all resources

    Declaration
    public void Dispose()
    Implements
    IDisposable.Dispose()

    Flush()

    Flush any ongoing file operations

    Declaration
    public void Flush()
    Implements
    IFileOperations.Flush()

    GetPointer()

    Returns state pointer

    Declaration
    public IntPtr GetPointer()
    Returns
    Type Description
    IntPtr

    State pointer

    OpenFileForLogging(ref FileSinkSystem.Configuration)

    Initializes state with file sink configuration

    Declaration
    public bool OpenFileForLogging(ref FileSinkSystem.Configuration config)
    Parameters
    Type Name Description
    FileSinkSystem.Configuration config

    Configuration to use

    Returns
    Type Description
    Boolean

    True if file stream was created successfully

    Implements
    IFileOperations.OpenFileForLogging(ref FileSinkSystem.Configuration)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023