UNPKG

sourcecontrol

Version:

A modern TypeScript CLI application for source control

40 lines 1.31 kB
import fs from 'fs-extra'; import { GitTimestamp } from './index-entry-utils'; type FileStats = Pick<fs.Stats, 'ctimeMs' | 'mtimeMs' | 'dev' | 'ino' | 'mode' | 'uid' | 'gid' | 'size'>; export declare class IndexEntry { private static readonly NULL_TERMINATOR; creationTime: GitTimestamp; modificationTime: GitTimestamp; deviceId: number; inodeNumber: number; fileMode: number; userId: number; groupId: number; fileSize: number; contentHash: string; assumeValid: boolean; stageNumber: number; filePath: string; constructor(data?: Partial<IndexEntry>); get modeType(): number; get modePerms(): number; get isRegularFile(): boolean; get isSymlink(): boolean; get isDirectory(): boolean; get isGitlink(): boolean; compareTo(other: IndexEntry): number; serialize(): Uint8Array; private writeFixedHeaderFields; private writeShaHash; private writeVariableFields; static deserialize(data: Uint8Array, offset: number): { entry: IndexEntry; nextOffset: number; }; private static readVariableFields; private readFixedHeaderFields; private readShaHash; static fromFileStats(path: string, stats: FileStats, sha: string): IndexEntry; } export {}; //# sourceMappingURL=index-entry.d.ts.map