Initial release for SPT 3.9
This commit is contained in:
18
types/services/cache/BundleHashCacheService.d.ts
vendored
Normal file
18
types/services/cache/BundleHashCacheService.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
import { HashUtil } from "@spt/utils/HashUtil";
|
||||
import { JsonUtil } from "@spt/utils/JsonUtil";
|
||||
import { VFS } from "@spt/utils/VFS";
|
||||
export declare class BundleHashCacheService {
|
||||
protected vfs: VFS;
|
||||
protected hashUtil: HashUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
protected bundleHashes: Record<string, number>;
|
||||
protected readonly bundleHashCachePath = "./user/cache/bundleHashCache.json";
|
||||
constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger);
|
||||
getStoredValue(key: string): number;
|
||||
storeValue(key: string, value: number): void;
|
||||
matchWithStoredHash(bundlePath: string, hash: number): boolean;
|
||||
calculateAndMatchHash(bundlePath: string): boolean;
|
||||
calculateAndStoreHash(bundlePath: string): void;
|
||||
}
|
||||
18
types/services/cache/ModHashCacheService.d.ts
vendored
Normal file
18
types/services/cache/ModHashCacheService.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
import { HashUtil } from "@spt/utils/HashUtil";
|
||||
import { JsonUtil } from "@spt/utils/JsonUtil";
|
||||
import { VFS } from "@spt/utils/VFS";
|
||||
export declare class ModHashCacheService {
|
||||
protected vfs: VFS;
|
||||
protected hashUtil: HashUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected logger: ILogger;
|
||||
protected modHashes: Record<string, string>;
|
||||
protected readonly modCachePath = "./user/cache/modCache.json";
|
||||
constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger);
|
||||
getStoredValue(key: string): string;
|
||||
storeValue(key: string, value: string): void;
|
||||
matchWithStoredHash(modName: string, hash: string): boolean;
|
||||
calculateAndCompareHash(modName: string, modContent: string): boolean;
|
||||
calculateAndStoreHash(modName: string, modContent: string): void;
|
||||
}
|
||||
Reference in New Issue
Block a user