internal void NotifyCloseDirectory(DirectoryAccessor directory) { lock (_locker) { OpenDirectories.Remove(directory); } }
public DirectoryAccessor OpenDirectory(string path, OpenDirectoryMode mode) { IDirectory dir = FileSystem.OpenDirectory(path, mode); var accessor = new DirectoryAccessor(dir, this); lock (_locker) { OpenDirectories.Add(accessor); } return(accessor); }
public Result OpenDirectory(out DirectoryAccessor directory, U8Span path, OpenDirectoryMode mode) { directory = default; Result rc = FileSystem.OpenDirectory(out IDirectory rawDirectory, path, mode); if (rc.IsFailure()) { return(rc); } var accessor = new DirectoryAccessor(rawDirectory, this); lock (_locker) { OpenDirectories.Add(accessor); } directory = accessor; return(Result.Success); }
internal DirectoryHandle(DirectoryAccessor directory) { Directory = directory; }