//------------------------------------------------------------------------ public LocalFile(string Name, DateTime Date, int Size, SymFile.Type Type) { name = Name; date = Date; size = Size; type = Type; }
//------------------------------------------------------------------------ public LocalFile(string Name, string Date, string Time, int Size, SymFile.Type Type) { name = Name; date = ParseDate(Date, Time); size = Size; type = Type; }
//------------------------------------------------------------------------ public static List <SymFile> FileListSym(SymInst inst, string pattern, SymFile.Type type) { if (!TrySymConnect(inst)) { throw new Exception("Not Connected to Sym"); } return(inst.Connection.FileList(pattern, type)); }
//------------------------------------------------------------------------ public static void FileDeleteSym(SymInst inst, string name, SymFile.Type type) { if (!TrySymConnect(inst)) { throw new Exception("Not Connected to Sym"); } inst.Connection.FileDelete(name, type); }
//------------------------------------------------------------------------ public static void FileRenameSym(SymInst inst, string namePrev, SymFile.Type type, string nameNew) { if (!TrySymConnect(inst)) { throw new Exception("Not Connected to Sym"); } inst.Connection.FileRename(namePrev, type, nameNew); }
//------------------------------------------------------------------------ public static string FileReadSym(SymInst inst, string name, SymFile.Type type) { if (!TrySymConnect(inst)) { throw new Exception("Not Connected to Sym"); } return(inst.Connection.FileRead(name, type)); }
//======================================================================== // file i/o - Sym //======================================================================== public static bool FileExistsSym(SymInst inst, string name, SymFile.Type type) { if (!TrySymConnect(inst)) { return(false); } return(inst.Connection.FileExists(name, type)); }
//------------------------------------------------------------------------ public LocalFile(Local local, string filename) { FileInfo nfo = new FileInfo(local.Path + '\\' + filename); if (!nfo.Exists) { throw new Exception("Tried to Construct LocalFile for Non-Existant File\nThis Shouldn't Happen"); } name = nfo.Name; date = nfo.LastWriteTime; size = (int)nfo.Length; if (name.Substring(name.LastIndexOf('.') + 1).ToUpper() == "REP") { type = SymFile.Type.REPGEN; } else { type = SymFile.Type.LETTER; } }