import { CoatContext } from "../types/coat-context";
import { CoatLockfileContinuousFileEntryStrict } from "../types/coat-lockfiles";
import { PolishedFile } from "./polish-files";
export declare enum FileOperationType {
    Delete = 0,
    DeleteSkipped = 1,
    Place = 2,
    Update = 3
}
interface FileOperationBase {
    type: FileOperationType;
    relativePath: string;
    absolutePath: string;
}
interface FileOperationWithoutContent extends FileOperationBase {
    type: FileOperationType.Delete | FileOperationType.DeleteSkipped;
}
interface FileOperationWithContent extends FileOperationBase {
    type: FileOperationType.Place | FileOperationType.Update;
    content: string;
}
export declare type FileOperation = FileOperationWithoutContent | FileOperationWithContent;
/**
 * Writes updates from coat sync to the disk.
 *
 * The top priority is to prevent accidental loss of data,
 * therefore coat sync should prompt the user in certain situations,
 * or automatically skip the creation / deletion.
 *
 * The following table presents the situations where the user shall be prompted:
 *
 * | Scenario / Disk context  | In lockfile (N) On disk (N) | In lockfile (N) Different disk content | In lockfile (N) On disk (Y) | In lockfile (Y) On disk (N) | In lockfile (Y) Different disk content | In lockfile (Y) On disk (Y) |
 * |--------------------------|-----------------------------|----------------------------------------|-----------------------------|-----------------------------|----------------------------------------|-----------------------------|
 * | Once File - Place        | Place                       | /                                      | /                           | /                           | /                                      | /                           |
 * | Continuous File - Place  | Place                       | Prompt                                 | Don't place                 | Place                       | Prompt                                 | Don't place                 |
 * | Continuous File - Delete | /                           | /                                      | /                           | Don't delete                | Don't delete                           | Delete                      |
 *
 * TODO: See #55
 * It could be possible to offer automatic customization file placement
 * if the detected change in a file can be easily refactored by
 * using a customization file.
 *
 * @param allFilesToPlace All files that should be created or updated
 * @param allFilesToRemove All files that should be deleted
 * @param currentFiles The current content of the files on disk
 * @param context The context of the current coat project
 */
export declare function updateFilesOnDisk(allFilesToPlace: PolishedFile[], allFilesToRemove: CoatLockfileContinuousFileEntryStrict[], currentFiles: {
    [filePath: string]: string | undefined;
}, context: CoatContext): Promise<void>;
export {};
