namespace NcProgramManager.Cnc.Mazak { /// Single entry of an FTP directory listing (file or directory). public sealed class FtpEntry { /// Entry name (no path). public string Name { get; set; } /// Full FTP path of the entry (parent dir + name). public string FullPath { get; set; } /// True if the entry is a directory. public bool IsDirectory { get; set; } /// File size in bytes; -1 when unknown (directories). public long Size { get; set; } = -1; /// Raw LIST line as returned by the server (diagnostics). public string Raw { get; set; } public override string ToString() { return IsDirectory ? string.Format("[DIR] {0}", Name) : string.Format(" {0} ({1} B)", Name, Size >= 0 ? Size.ToString() : "?"); } } }