protected override Result OpenDirectoryImpl(out IDirectory directory, U8Span path, OpenDirectoryMode mode)
        {
            directory = default;

            if (!FileTable.TryOpenDirectory(path.ToString(), out FindPosition position))
            {
                return(ResultFs.PathNotFound.Log());
            }

            directory = new RomFsDirectory(this, position, mode);
            return(Result.Success);
        }
        protected override Result DoOpenDirectory(out IDirectory directory, U8Span path, OpenDirectoryMode mode)
        {
            UnsafeHelpers.SkipParamInit(out directory);

            if (!FileTable.TryOpenDirectory(path.ToString(), out FindPosition position))
            {
                return(ResultFs.PathNotFound.Log());
            }

            directory = new RomFsDirectory(this, position, mode);
            return(Result.Success);
        }
Exemple #3
0
        protected override Result OpenDirectoryImpl(out IDirectory directory, string path, OpenDirectoryMode mode)
        {
            directory = default;
            path      = PathTools.Normalize(path);

            if (!FileTable.TryOpenDirectory(path, out FindPosition position))
            {
                return(ResultFs.PathNotFound.Log());
            }

            directory = new RomFsDirectory(this, position, mode);
            return(Result.Success);
        }