Exemplo n.º 1
0
 //------------------------------------------------------------------------
 public LocalFile(string Name, DateTime Date, int Size, SymFile.Type Type)
 {
     name = Name;
     date = Date;
     size = Size;
     type = Type;
 }
Exemplo n.º 2
0
 //------------------------------------------------------------------------
 public LocalFile(string Name, string Date, string Time, int Size, SymFile.Type Type)
 {
     name = Name;
     date = ParseDate(Date, Time);
     size = Size;
     type = Type;
 }
Exemplo n.º 3
0
 //------------------------------------------------------------------------
 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));
 }
Exemplo n.º 4
0
 //------------------------------------------------------------------------
 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);
 }
Exemplo n.º 5
0
 //------------------------------------------------------------------------
 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);
 }
Exemplo n.º 6
0
 //------------------------------------------------------------------------
 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));
 }
Exemplo n.º 7
0
 //========================================================================
 //  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));
 }
Exemplo n.º 8
0
        //------------------------------------------------------------------------
        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;
            }
        }