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

            if (!IsInitialized)
            {
                return(ResultFs.PreconditionViolation.Log());
            }

            ReadOnlySpan <byte> rootPath = new[] { (byte)'/' };

            if (StringUtils.Compare(rootPath, path, 2) != 0)
            {
                return(ResultFs.PathNotFound.Log());
            }

            directory = new PartitionDirectory(this, mode);

            return(Result.Success);
        }
Exemplo n.º 2
0
 protected override Result OpenDirectoryImpl(out IDirectory directory, string path, OpenDirectoryMode mode)
 {
     directory = new PartitionDirectory(this, path, mode);
     return(Result.Success);
 }
Exemplo n.º 3
0
 protected override Result DoOpenDirectory(out IDirectory directory, U8Span path, OpenDirectoryMode mode)
 {
     directory = new PartitionDirectory(this, path.ToString(), mode);
     return(Result.Success);
 }