// Token: 0x06001A2D RID: 6701 RVA: 0x0006FE10 File Offset: 0x0006E010
 private void UpdateDirectories()
 {
     SteamworksRemoteStorageFileSystem.EnterFileSystemShared();
     try
     {
         if (this.treeIsDirty)
         {
             this.treeIsDirty = false;
             IEnumerable <string> enumerable = from file in SteamworksRemoteStorageFileSystem.remoteStorage.Files
                                               select file.FileName;
             if (!enumerable.SequenceEqual(this.allFilePaths))
             {
                 this.allFilePaths = enumerable.ToArray <string>();
                 this.pathToNodeMap.Clear();
                 this.pathToNodeMap[UPath.Root] = this.rootNode;
                 this.rootNode.RemoveAllChildren();
                 foreach (string path in this.allFilePaths)
                 {
                     this.AddFileToTree(path);
                 }
             }
         }
     }
     finally
     {
         SteamworksRemoteStorageFileSystem.ExitFileSystemShared();
     }
 }
        // Token: 0x06001A1F RID: 6687 RVA: 0x0006FC58 File Offset: 0x0006DE58
        protected override Stream OpenFileImpl(UPath path, FileMode mode, FileAccess access, FileShare share)
        {
            SteamworksRemoteStorageFileSystem.EnterFileSystemShared();
            if (!path.IsAbsolute)
            {
                throw new ArgumentException(string.Format("'{0}' must be absolute. {0} = {1}", "path", path));
            }
            Stream result;

            try
            {
                bool flag = false;
                switch (mode)
                {
                case FileMode.CreateNew:
                    flag = true;
                    break;

                case FileMode.Create:
                    flag = true;
                    break;

                case FileMode.Append:
                    throw new NotImplementedException();
                }
                flag &= (access == FileAccess.Write);
                if (flag)
                {
                    this.treeIsDirty = true;
                    result           = SteamworksRemoteStorageFileSystem.remoteStorage.CreateFile(path.ToRelative().FullName).OpenWrite();
                }
                else if (access != FileAccess.Read)
                {
                    if (access != FileAccess.Write)
                    {
                        throw new NotImplementedException();
                    }
                    SteamworksRemoteStorageFileSystem.FileNode fileNode = this.GetFileNode(path);
                    result = ((fileNode != null) ? fileNode.OpenWrite() : null);
                }
                else
                {
                    SteamworksRemoteStorageFileSystem.FileNode fileNode2 = this.GetFileNode(path);
                    result = ((fileNode2 != null) ? fileNode2.OpenRead() : null);
                }
            }
            finally
            {
                SteamworksRemoteStorageFileSystem.ExitFileSystemShared();
            }
            return(result);
        }
        // Token: 0x06001A1B RID: 6683 RVA: 0x0006FBB8 File Offset: 0x0006DDB8
        protected override long GetFileLengthImpl(UPath path)
        {
            int num = 0;

            SteamworksRemoteStorageFileSystem.EnterFileSystemShared();
            try
            {
                this.UpdateDirectories();
                SteamworksRemoteStorageFileSystem.FileNode fileNode = this.GetFileNode(path);
                num = ((fileNode != null) ? fileNode.GetLength() : 0);
            }
            finally
            {
                SteamworksRemoteStorageFileSystem.ExitFileSystemShared();
            }
            return((long)num);
        }
 // Token: 0x06001A1E RID: 6686 RVA: 0x0006FC14 File Offset: 0x0006DE14
 protected override void DeleteFileImpl(UPath path)
 {
     SteamworksRemoteStorageFileSystem.EnterFileSystemShared();
     try
     {
         this.treeIsDirty = true;
         SteamworksRemoteStorageFileSystem.FileNode fileNode = this.GetFileNode(path);
         if (fileNode != null)
         {
             fileNode.Delete();
         }
     }
     finally
     {
         SteamworksRemoteStorageFileSystem.ExitFileSystemShared();
     }
 }
        // Token: 0x06001A2F RID: 6703 RVA: 0x0006FF0A File Offset: 0x0006E10A
        protected override IEnumerable <UPath> EnumeratePathsImpl(UPath path, string searchPattern, SearchOption searchOption, SearchTarget searchTarget)
        {
            this.UpdateDirectories();
            SearchPattern search           = SearchPattern.Parse(ref path, ref searchPattern);
            List <UPath>  foldersToProcess = new List <UPath>
            {
                path
            };
            SortedSet <UPath> entries = new SortedSet <UPath>(UPath.DefaultComparerIgnoreCase);

            while (foldersToProcess.Count > 0)
            {
                UPath upath = foldersToProcess[0];
                foldersToProcess.RemoveAt(0);
                int num = 0;
                entries.Clear();
                SteamworksRemoteStorageFileSystem.EnterFileSystemShared();
                try
                {
                    SteamworksRemoteStorageFileSystem.Node directoryNode = this.GetDirectoryNode(upath);
                    if (upath == path)
                    {
                        this.AssertDirectory(directoryNode, upath);
                    }
                    else if (!(directoryNode is SteamworksRemoteStorageFileSystem.DirectoryNode))
                    {
                        continue;
                    }
                    SteamworksRemoteStorageFileSystem.DirectoryNode directoryNode2 = (SteamworksRemoteStorageFileSystem.DirectoryNode)directoryNode;
                    for (int i = 0; i < directoryNode2.childCount; i++)
                    {
                        SteamworksRemoteStorageFileSystem.Node child = directoryNode2.GetChild(i);
                        if (!(child is SteamworksRemoteStorageFileSystem.FileNode) || searchTarget != SearchTarget.Directory)
                        {
                            bool  flag  = search.Match(child.path);
                            bool  flag2 = searchOption == SearchOption.AllDirectories && child is SteamworksRemoteStorageFileSystem.DirectoryNode;
                            bool  flag3 = (child is SteamworksRemoteStorageFileSystem.FileNode && searchTarget != SearchTarget.Directory && flag) || (child is SteamworksRemoteStorageFileSystem.DirectoryNode && searchTarget != SearchTarget.File && flag);
                            UPath item  = upath / child.path;
                            if (flag2)
                            {
                                foldersToProcess.Insert(num++, item);
                            }
                            if (flag3)
                            {
                                entries.Add(item);
                            }
                        }
                    }
                }
                finally
                {
                    SteamworksRemoteStorageFileSystem.ExitFileSystemShared();
                }
                foreach (UPath upath2 in entries)
                {
                    yield return(upath2);
                }
                SortedSet <UPath> .Enumerator enumerator = default(SortedSet <UPath> .Enumerator);
            }
            yield break;
            yield break;
        }