/// <summary> /// Loads an archived file's data. /// </summary> public Task <byte[]> LoadFileDataAsync(string filePath) { if (int.TryParse(filePath, out var file) && file < _files) { return(LoadFileDataAsync(file)); } CoreDebug.Log($"LoadFileDataAsync: {filePath} @ {_files}"); throw new FileNotFoundException(filePath); }
/// <summary> /// Loads an archived file's data. /// </summary> public Task <byte[]> LoadFileDataAsync(string filePath) { var files = _filesByPath[filePath.Replace("/", "\\")].ToArray(); if (files.Length == 1) { return(LoadFileDataAsync(files[0])); } CoreDebug.Log($"LoadFileDataAsync: {filePath} @ {files.Length}"); if (files.Length == 0) { throw new FileNotFoundException(filePath); } throw new NotSupportedException(); }