示例#1
0
        /// <summary>
        /// Cache files and dirs data.
        /// </summary>
        public static void CacheData()
        {
            var devices = DataHolder.DeviceData.AllDevices;

            for (int i = 0; i < devices.Count; i++)
            {
                var device = devices[i];
                DataHolder.DeviceData.CurrentDevice = device;

                var dirs = device.FileSystem.AllDirectories;
                foreach (var dir in dirs)
                {
                    FileSystem.CacheDirContent(dir.Value);
                }

                var files = device.FileSystem.AllFiles;
                foreach (var file in files)
                {
                    FileSystem.CacheFileContents(file.Value);
                }

                FileSystem.CacheRootDir();
            }

            DataHolder.DeviceData.CurrentDevice = DataHolder.DeviceData.PlayerDevice;
        }