Пример #1
0
 internal void NotifyCloseDirectory(DirectoryAccessor directory)
 {
     lock (_locker)
     {
         OpenDirectories.Remove(directory);
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
 internal DirectoryHandle(DirectoryAccessor directory)
 {
     Directory = directory;
 }