UNPKG

ailock

Version:

AI-Proof File Guard - Protect sensitive files from accidental AI modifications

43 lines 1.5 kB
/** * Platform abstraction layer for cross-platform file locking * * This module provides a unified interface for file locking operations * across different operating systems (Unix/Linux/macOS, Windows, WSL). */ export declare enum Platform { UNIX = "unix", WINDOWS = "windows", WSL = "wsl" } export interface PlatformAdapter { lockFile(filePath: string): Promise<void>; unlockFile(filePath: string): Promise<void>; isLocked(filePath: string): Promise<boolean>; supportsImmutable(): boolean; validateSecurity(filePath: string): Promise<boolean>; getSecurityInfo(filePath: string): Promise<SecurityInfo>; } export interface SecurityInfo { isReadOnly: boolean; isImmutable: boolean; permissions: string; platform: Platform; lastModified: Date; checksum?: string; } export { PlatformFactory } from './platform/PlatformFactory.js'; export { BasePlatformAdapter } from './platform/BasePlatformAdapter.js'; export { UnixAdapter } from './platform/UnixAdapter.js'; export { WindowsAdapter } from './platform/WindowsAdapter.js'; export { WSLAdapter } from './platform/WSLAdapter.js'; /** * Detect the current platform * @deprecated Use PlatformFactory.detectPlatform() instead */ export declare function detectPlatform(): Platform; /** * Get the appropriate platform adapter * @deprecated Use PlatformFactory.createAdapter() instead */ export declare function getPlatformAdapter(): PlatformAdapter; //# sourceMappingURL=platform.d.ts.map