Show / Hide Table of Contents

    Class FileHandler

    Handle in charge of exposing the file functionalities, such as loading, saving, copying and deleting.

    Inheritance
    System.Object
    BaseHandler
    FileHandler
    Inherited Members
    BaseHandler.GetReusableApiRequest<T>()
    BaseHandler.GetHandlerStoragePath<T>()
    BaseHandler.JSON_FOLDER_NAME
    BaseHandler.GetHandlerJsonFolderPath<T>()
    BaseHandler.GetApiJsonFileName<T>()
    BaseHandler.GetApiJsonFileName<T>(UserProfile)
    BaseHandler.GetApiJsonFileFullPath<T, K>(UserProfile)
    BaseHandler.EncryptData(String)
    BaseHandler.DecryptData(String)
    BaseHandler.SaveJsonData<T, K>(AppearitionRequest<T>)
    BaseHandler.SaveJsonData<T, K>(AppearitionRequest<T>, UserProfile)
    BaseHandler.SaveJsonData<T, K>(AppearitionRequest<T>, String)
    BaseHandler.SaveJsonData<K>(String, String)
    BaseHandler.TryToFetchOfflineRequestContent<T, K>()
    BaseHandler.TryToFetchOfflineRequestContent<T, K>(UserProfile)
    BaseHandler.TryToFetchOfflineRequestContent<T, K>(String)
    BaseHandler.LoadJsonTextInFile<K>(String)
    BaseHandler.GetContentFromFileProcess(String, Action<Byte[]>)
    BaseHandler.SaveContentToFileProcess(Byte[], String, Action<Boolean>)
    BaseHandler.DeleteFileProcess(String, Action<Boolean>)
    BaseHandler.CopyFileToDestinationProcess(String, String, Action<Boolean>)
    BaseHandler.IsThereExistingMediaWithMatchingChecksum(String, String)
    BaseHandler.DownloadGenericFile(String, String, String, Boolean, Action<Byte[]>)
    BaseHandler.HandleSimpleOfflineApiContentLoadingWithCallback<T, K>(Action<T>, Action<EmsError>, Action<Boolean>)
    BaseHandler.HandleSimpleOnlineOnlyApiInternetCheck(Action<Boolean>, Action<EmsError>, Action<Boolean>)
    Namespace: Appearition
    Assembly: Appearition.SDK.dll
    Syntax
    public class FileHandler : BaseHandler

    Methods

    CopyExistingFileToDestination(String, String, Action<Boolean>)

    Copies a local file at a given path to a destination at a given path.

    Declaration
    public static void CopyExistingFileToDestination(string pathToSourceFile, string pathToDestinationFile, Action<bool> onComplete = null)
    Parameters
    Type Name Description
    System.String pathToSourceFile

    The full path to the original file, including filename and extension.

    System.String pathToDestinationFile

    The full path to the destination file location, including filename and extension.

    System.Action<System.Boolean> onComplete

    Called once the process is complete. Includes whether or not the action was successful.

    CopyExistingFileToDestinationProcess(String, String, Action<Boolean>)

    Copies a local file at a given path to a destination at a given path.

    Declaration
    public static IEnumerator CopyExistingFileToDestinationProcess(string pathToSourceFile, string pathToDestinationFile, Action<bool> onComplete = null)
    Parameters
    Type Name Description
    System.String pathToSourceFile

    The full path to the original file, including filename and extension.

    System.String pathToDestinationFile

    The full path to the destination file location, including filename and extension.

    System.Action<System.Boolean> onComplete

    Called once the process is complete. Includes whether or not the action was successful.

    Returns
    Type Description
    System.Collections.IEnumerator

    DeleteExistingFile(String, Action<Boolean>)

    Deletes the file at a given location.

    Declaration
    public static void DeleteExistingFile(string pathToFile, Action<bool> onComplete = null)
    Parameters
    Type Name Description
    System.String pathToFile

    The full path to the file, including filename and extension.

    System.Action<System.Boolean> onComplete

    Called once the process is complete. Includes whether or not the action was successful.

    DeleteExistingFileProcess(String, Action<Boolean>)

    Deletes the file at a given location.

    Declaration
    public static IEnumerator DeleteExistingFileProcess(string pathToFile, Action<bool> onComplete = null)
    Parameters
    Type Name Description
    System.String pathToFile

    The full path to the file, including filename and extension.

    System.Action<System.Boolean> onComplete

    Called once the process is complete. Includes whether or not the action was successful.

    Returns
    Type Description
    System.Collections.IEnumerator

    LoadBytesFromFile(String, Action<Byte[]>)

    Fetches the content of a local file at a given path.

    Declaration
    public static void LoadBytesFromFile(string pathToFile, Action<byte[]> onComplete = null)
    Parameters
    Type Name Description
    System.String pathToFile

    Full path to the file to load.

    System.Action<System.Byte[]> onComplete

    Called once the file loading process has completed. Contains the file content.

    LoadBytesFromFileProcess(String, Action<Byte[]>)

    Fetches the content of a local file at a given path.

    Declaration
    public static IEnumerator LoadBytesFromFileProcess(string pathToFile, Action<byte[]> onComplete = null)
    Parameters
    Type Name Description
    System.String pathToFile

    Full path to the file to load.

    System.Action<System.Byte[]> onComplete

    Called once the file loading process has completed. Contains the file content.

    Returns
    Type Description
    System.Collections.IEnumerator

    SaveBytesToFile(Byte[], String, Action<Boolean>)

    Declaration
    public static void SaveBytesToFile(byte[] data, string pathToFile, Action<bool> onComplete = null)
    Parameters
    Type Name Description
    System.Byte[] data
    System.String pathToFile
    System.Action<System.Boolean> onComplete

    SaveBytesToFileProcess(Byte[], String, Action<Boolean>)

    Saves given content to a file at a given full path.

    Declaration
    public static IEnumerator SaveBytesToFileProcess(byte[] data, string pathToFile, Action<bool> onComplete = null)
    Parameters
    Type Name Description
    System.Byte[] data

    The content that the file should contain.

    System.String pathToFile

    The full path to the file, including filename and extension.

    System.Action<System.Boolean> onComplete

    Called once the process is complete. Includes whether or not the action was successful.

    Returns
    Type Description
    System.Collections.IEnumerator

    Extension Methods

    ObjectExtension.ToStream(Object)
    Back to top Appearition SDK for Unity API