using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.FileSystem;
using Tango.FileSystem.Network;
using static System.Environment;
namespace Tango.FSE.Common.FileSystem
{
///
/// Represents a remote machine PPC file system provider.
///
public interface IFileSystemProvider
{
///
/// Gets or sets a value indicating whether to enable a P2P WebRTC channel for fast transport.
///
bool EnableWebRTC { get; set; }
///
/// Gets a value indicating whether the WebRTC channel is available.
///
bool IsWebRtcAvailable { get; }
///
/// Gets a folder by the specified path.
///
/// The path.
///
Task GetFolder(String path);
///
/// Gets the specified special folder.
///
/// The special folder.
///
Task GetSpecialFolder(SpecialFolder specialFolder);
///
/// Gets the ThisPC (the root path of the PC).
///
///
Task GetThisPC();
///
/// Downloads the specified file or folder item.
///
/// The file or folder.
/// The local target folder or file.
/// Indicates whether the localTargetFolder is a file.
///
Task Download(FileSystemItem item, String localTargetFolderOrFile, bool isLocaTargetFile = false);
///
/// Downloads the specified file or folder item.
///
/// The remote file or folder.
/// Indicates whether the remote path is a file.
/// The local target folder or file.
/// Indicates whether the localTargetFolder is a file.
///
Task Download(String remotePath, bool isRemotePathFile, String localTargetFolderOrFile, bool isLocalTargetFile = false);
///
/// Uploads the specified local file or folder.
///
/// The local source path.
/// The remote folder.
///
Task Upload(String localSourcePath, FileSystemItem remoteFolder);
///
/// Uploads the specified local file or folder.
///
/// The local source path.
/// The remote destination path.
/// Indicates whether this upload operation is performed for a remote upgrade.
///
/// Could not locate the local file or directory to upload.
Task Upload(String localSourcePath, String remotePath, bool forRemoteUpgrade = false);
///
/// Copies the specified remote file or folder to the specified target remote folder.
///
/// The remote source file or folder.
/// The remote target folder.
///
Task Copy(FileSystemItem source, FileSystemItem target);
///
/// Moves the specified remote file or folder to the remote target folder.
///
/// The remote source file or folder.
/// The remote target folder.
///
Task Move(FileSystemItem source, FileSystemItem target);
///
/// Renames the specified file or folder.
///
/// The remote source file or folder.
/// The new name.
///
Task Rename(FileSystemItem source, String newName);
///
/// Deletes the specified file or folder.
///
/// The remote file or folder.
///
Task Delete(FileSystemItem item);
///
/// Creates a new folder at the specified remote parent.
///
/// The remote parent path.
/// Name of the new folder.
///
Task CreateFolder(FileSystemItem parent, String folderName);
///
/// Performs a disk space optimization.
///
///
Task PerformDiskSpaceOptimization();
}
}