Class FileUtility | Asset Graph | 1.6.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class FileUtility

    Inheritance
    Object
    FileUtility
    Namespace: UnityEngine.AssetGraph
    Syntax
    public class FileUtility

    Methods

    ContainsHiddenFiles(String)

    Declaration
    public static bool ContainsHiddenFiles(string filePath)
    Parameters
    Type Name Description
    String filePath
    Returns
    Type Description
    Boolean

    CopyFile(String, String)

    Declaration
    public static void CopyFile(string sourceFilePath, string targetFilePath)
    Parameters
    Type Name Description
    String sourceFilePath
    String targetFilePath

    CopyTemplateFile(String, String, String, String)

    Declaration
    public static void CopyTemplateFile(string sourceFilePath, string targetFilePath, string srcName, string dstName)
    Parameters
    Type Name Description
    String sourceFilePath
    String targetFilePath
    String srcName
    String dstName

    DeleteDirectory(String, Boolean, Boolean)

    Declaration
    public static void DeleteDirectory(string dirPath, bool isRecursive, bool forceDelete = true)
    Parameters
    Type Name Description
    String dirPath
    Boolean isRecursive
    Boolean forceDelete

    DeleteFileThenDeleteFolderIfEmpty(String)

    Declaration
    public static void DeleteFileThenDeleteFolderIfEmpty(string localTargetFilePath)
    Parameters
    Type Name Description
    String localTargetFilePath

    EnsureAssetBundleCacheDirExists(BuildTarget, NodeData, Boolean)

    Declaration
    public static string EnsureAssetBundleCacheDirExists(BuildTarget t, NodeData node, bool remake = false)
    Parameters
    Type Name Description
    BuildTarget t
    NodeData node
    Boolean remake
    Returns
    Type Description
    String

    EnsureCacheDirExists(BuildTarget, NodeData, String)

    Declaration
    public static string EnsureCacheDirExists(BuildTarget t, NodeData node, string name)
    Parameters
    Type Name Description
    BuildTarget t
    NodeData node
    String name
    Returns
    Type Description
    String

    GetAllFilePathsInFolder(String, Boolean, Boolean)

    Declaration
    public static List<string> GetAllFilePathsInFolder(string localFolderPath, bool includeHidden = false, bool includeMeta = false)
    Parameters
    Type Name Description
    String localFolderPath
    Boolean includeHidden
    Boolean includeMeta
    Returns
    Type Description
    List<String>

    GetFilePathsInFolder(String, Boolean, Boolean)

    Declaration
    public static List<string> GetFilePathsInFolder(string folderPath, bool includeHidden = false, bool includeMeta = false)
    Parameters
    Type Name Description
    String folderPath
    Boolean includeHidden
    Boolean includeMeta
    Returns
    Type Description
    List<String>

    GetPathWithAssetsPath(String)

    Declaration
    public static string GetPathWithAssetsPath(string pathUnderAssetsFolder)
    Parameters
    Type Name Description
    String pathUnderAssetsFolder
    Returns
    Type Description
    String

    GetPathWithProjectPath(String)

    Declaration
    public static string GetPathWithProjectPath(string pathUnderProjectFolder)
    Parameters
    Type Name Description
    String pathUnderProjectFolder
    Returns
    Type Description
    String

    IsMetaFile(String)

    Declaration
    public static bool IsMetaFile(string filePath)
    Parameters
    Type Name Description
    String filePath
    Returns
    Type Description
    Boolean

    PathCombine(String[])

    Declaration
    public static string PathCombine(params string[] paths)
    Parameters
    Type Name Description
    String[] paths
    Returns
    Type Description
    String

    ProjectPathWithSlash()

    Declaration
    public static string ProjectPathWithSlash()
    Returns
    Type Description
    String

    RemakeDirectory(String)

    Declaration
    public static void RemakeDirectory(string localFolderPath)
    Parameters
    Type Name Description
    String localFolderPath

    RemoveFileAttributes(String, Boolean)

    Declaration
    public static void RemoveFileAttributes(string dirPath, bool isRecursive)
    Parameters
    Type Name Description
    String dirPath
    Boolean isRecursive
    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