using System.Collections.Generic;
using System.IO;
using System.IO.Abstractions;
namespace Terminal.Gui {
///
/// Interface for defining how to handle file/directory
/// deletion, rename and newing attempts in .
///
public interface IFileOperations {
///
/// Specifies how to handle file/directory deletion attempts
/// in .
///
///
/// if operation was completed or
/// if cancelled
/// Ensure you use a try/catch block with appropriate
/// error handling (e.g. showing a
bool Delete (IEnumerable toDelete);
///
/// Specifies how to handle file/directory rename attempts
/// in .
///
///
///
/// The new name for the file or null if cancelled
/// Ensure you use a try/catch block with appropriate
/// error handling (e.g. showing a
IFileSystemInfo Rename (IFileSystem fileSystem, IFileSystemInfo toRename);
///
/// Specifies how to handle 'new directory' operation
/// in .
///
///
/// The parent directory in which the new
/// directory should be created
/// The newly created directory or null if cancelled.
/// Ensure you use a try/catch block with appropriate
/// error handling (e.g. showing a
IFileSystemInfo New (IFileSystem fileSystem, IDirectoryInfo inDirectory);
}
}