arx-level-generator
Version:
A tool for creating Arx Fatalis maps
38 lines (37 loc) • 1.4 kB
TypeScript
import { Settings } from '../Settings.js';
export declare const hashingAlgorithm = "sha1";
/**
* Creates the folder structure inside the project's cache folder for a given path
* (supports nested folders)
*
* @param folder - a folder relative to the project's cache folder
* @param settings - an instance of the Settings object
* @returns the absolute path for the given folder
*/
export declare const createCacheFolderIfNotExists: (folder: string, settings: Settings) => Promise<string>;
/**
*
* @param filename - a pathname of a file relative to the project's root directory
*/
export declare const getCacheStats: (filename: string, settings: Settings) => Promise<{
filename: string;
exists: boolean;
hash: string | undefined;
}>;
/**
* This function assumes that the cache folder exists
* and that the hash of the cached file is in sync with the contents of the __hashes.json
*
* @param filename - full path to a file
*/
export declare const loadHashOf: (filename: string, settings: Settings) => Promise<string | undefined>;
/**
* This function does not generate hashes, but merely stores them
*
* @param filename - full path to a file
*/
export declare const saveHashOf: (filename: string, hash: string, settings: Settings) => Promise<void>;
/**
* @param filename - full path to a file
*/
export declare const getHashOfFile: (filename: string) => Promise<string>;