<commit_before>// Type definitions for pathwatcher
// Project: https://github.com/atom/node-pathwatcher
// Definitions by: vvakame <https://github.com/vvakame/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />
/// <reference types="Q" />

export as namespace PathWatcher;

export interface IFileStatic {
	new (path:string, symlink?:boolean):IFile;
}

export interface IFile {
	realPath:string;
	path:string;
	symlink:boolean;
	cachedContents:string;
	digest:string;

	handleEventSubscriptions():void;
	setPath(path:string):void;
	getPath():string;
	getRealPathSync():string;
	getBaseName():string;
	write(text:string):void;
	readSync(flushCache:boolean):string;
	read(flushCache?:boolean):Q.Promise<string>;
	// exists():boolean;
	existsSync():boolean;
	setDigest(contents:string):void;
	getDigest():string;
	writeFileWithPrivilegeEscalationSync (filePath:string, text:string):void;
	handleNativeChangeEvent(eventType:string, eventPath:string):void;<commit_msg>Use Q as a module in pathwatcher<commit_after>// Type definitions for pathwatcher
// Project: https://github.com/atom/node-pathwatcher
// Definitions by: vvakame <https://github.com/vvakame/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />
/// <reference types="q" />

import * as Q from "q";

export as namespace PathWatcher;

export interface IFileStatic {
	new (path:string, symlink?:boolean):IFile;
}

export interface IFile {
	realPath:string;
	path:string;
	symlink:boolean;
	cachedContents:string;
	digest:string;

	handleEventSubscriptions():void;
	setPath(path:string):void;
	getPath():string;
	getRealPathSync():string;
	getBaseName():string;
	write(text:string):void;
	readSync(flushCache:boolean):string;
	read(flushCache?:boolean):Q.Promise<string>;
	// exists():boolean;
	existsSync():boolean;
	setDigest(contents:string):void;
	getDigest():string;
	writeFileWithPrivilegeEscalationSync (filePath:string, text:string):void;
	handleNativeChangeEvent(eventType:string, eventPath:string):void;
{'fraction_non_alphanumeric': 0.1452081316553727, 'fraction_numerical': 0.0, 'mean_word_length': 7.011627906976744, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4786407', 'n_tokens_mistral': 669, 'n_tokens_neox': 669, 'n_words': 114}