Search Results for

    Show / Hide Table of Contents

    Class AssetsDirectory

    Base class containing method for accessing assets in a directory.

    Inheritance
    object
    AssetsDirectoryBase
    AssetsDirectory
    Inherited Members
    AssetsDirectoryBase.DefaultFolderName
    AssetsDirectoryBase.RootPath
    AssetsDirectoryBase.UpdateRootPath(string)
    AssetsDirectoryBase.EnumerateDirectories(string)
    AssetsDirectoryBase.EnumerateDirectories(string, string)
    AssetsDirectoryBase.EnumerateFiles(string)
    AssetsDirectoryBase.EnumerateFiles(string, string)
    AssetsDirectoryBase.ReadAsStringAsync(string)
    AssetsDirectoryBase.GetFullPath(string)
    Namespace: Evergine.Platform
    Assembly: Evergine.Platform.dll
    Syntax
    public class AssetsDirectory : AssetsDirectoryBase

    Constructors

    AssetsDirectory()

    Initializes a new instance of the AssetsDirectory class.

    Declaration
    public AssetsDirectory()

    AssetsDirectory(string)

    Initializes a new instance of the AssetsDirectory class.

    Declaration
    public AssetsDirectory(string rootPath)
    Parameters
    Type Name Description
    string rootPath

    The root path of the assets directory.

    Methods

    EnumerateDirectories(string, string, SearchOption)

    Returns an enumerable collection of subdirectories that match the specified search pattern in the specified relative path in the assets directory, and optionally searches subdirectories.

    Declaration
    public override IEnumerable<string> EnumerateDirectories(string path, string searchPattern, SearchOption option)
    Parameters
    Type Name Description
    string path

    The relative path in the assets directory.

    string searchPattern

    The search string to match against the names of files in path. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.

    SearchOption option
    Returns
    Type Description
    IEnumerable<string>

    An enumerable collection of subdirectories the specified relative path in the assets directory that match the specified criteria, or an empty enumerable collection if no directories are found.

    Overrides
    AssetsDirectoryBase.EnumerateDirectories(string, string, SearchOption)
    Remarks

    If an existing directory is empty, it will be discarded in the enumerable collection.

    EnumerateFiles(string, string, SearchOption)

    Returns the names of files that match the specified search pattern in the specified relative path in the assets directory, and optionally searches subdirectories.

    Declaration
    public override IEnumerable<string> EnumerateFiles(string path, string searchPattern, SearchOption option)
    Parameters
    Type Name Description
    string path

    The relative path in the assets directory.

    string searchPattern

    The search string to match against the names of files in path. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.

    SearchOption option
    Returns
    Type Description
    IEnumerable<string>

    An enumerable collection of names for the files in the specified relative path in the assets directory that match the specified criteria, or an empty enumerable collection if no directories are found.

    Overrides
    AssetsDirectoryBase.EnumerateFiles(string, string, SearchOption)

    Exists(string)

    Determines whether the specified asset file exists.

    Declaration
    public override bool Exists(string path)
    Parameters
    Type Name Description
    string path

    The asset file path to check.

    Returns
    Type Description
    bool

    true if the assets directory contains the specified file name; otherwise, false.

    Overrides
    AssetsDirectoryBase.Exists(string)

    Open(string)

    Opens the specified asset file.

    Declaration
    public override AssetStream Open(string path)
    Parameters
    Type Name Description
    string path

    The relative path to the asset file.

    Returns
    Type Description
    AssetStream

    The result.

    Overrides
    AssetsDirectoryBase.Open(string)

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX