ailock
Version:
AI-Proof File Guard - Protect sensitive files from accidental AI modifications
42 lines • 1.2 kB
TypeScript
import { Platform } from '../platform.js';
import { BasePlatformAdapter } from './BasePlatformAdapter.js';
/**
* Windows platform adapter for file locking
*/
export declare class WindowsAdapter extends BasePlatformAdapter {
protected platformType: Platform;
constructor();
/**
* Lock a file on Windows
*/
lockFile(filePath: string): Promise<void>;
/**
* Unlock a file on Windows
*/
unlockFile(filePath: string): Promise<void>;
/**
* Check if a file is locked on Windows
*/
isLocked(filePath: string): Promise<boolean>;
/**
* Windows doesn't support immutable attributes like Unix
*/
supportsImmutable(): boolean;
/**
* Check if a file has immutable attributes (always false on Windows)
*/
protected checkImmutable(filePath: string): Promise<boolean>;
/**
* Set or remove the read-only attribute using attrib command
*/
private setReadOnlyAttribute;
/**
* Set Windows ACLs for additional protection
*/
private setWindowsACL;
/**
* Check if running with administrator privileges
*/
private isAdmin;
}
//# sourceMappingURL=WindowsAdapter.d.ts.map