// ---------------------------------------------------------------------------------------------
// Copyright (c) 2021-2024, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Pal3.Core.FileSystem
{
///
/// File system wrapper for CPack archives
///
public interface ICpkFileSystem : IFileSystem
{
///
/// Mount a Cpk archive to the file system.
///
/// CPK file relative path
/// Codepage CPK file uses for encoding text info
public void Mount(string cpkFileRelativePath, int codepage);
///
/// Check if file exists in the archive or any of the segmented archives using virtual path.
///
/// File virtual path {Cpk file name}\{File relative path inside archive}
/// Example: music.cpk\music\PI01.mp3
/// Name of the archive or the segmented archive if exists
/// True if file exists
public bool FileExists(string fileVirtualPath, out string archiveName);
///
/// Preload archive into memory for faster read performance.
///
public void LoadArchiveIntoMemory(string cpkFileName);
///
/// Dispose in-memory archive data.
///
public void DisposeInMemoryArchive(string cpkFileName);
///
/// Dispose all in-memory archive data.
///
public void DisposeAllInMemoryArchives();
///
/// Extract all archives to the specified destination
///
public void ExtractTo(string outputFolder);
}
}