예제 #1
0
 private static void PerformExistenceCheck(string location, TypeofFile typeofFile)
 {
     if (!CheckExists(location, typeofFile))
     {
         throw new Exception("Doesn't Exist :" + location);
     }
 }
 private void CreateFile(string Name, TypeofFile typeData)
 {
     File.Create(Name);
     System.Threading.Thread.Sleep(500);
     if (typeData == TypeofFile.VDB)
     {
         using (FileStream fileStreamVDB = File.OpenWrite(RecordVDB))
         {
             ArVDB = new ArchiveSerialization.Archive(fileStreamVDB, ArchiveSerialization.ArchiveOp.store);
             CreateVDBHandle(ArVDB);
         }
     }
 }
예제 #3
0
        private static bool CheckExists(string location, TypeofFile typeofFile)
        {
            var result = false;

            switch (typeofFile)
            {
            case TypeofFile.File:
                result = File.Exists(location);
                break;

            case TypeofFile.Directory:
                result = Directory.Exists(location);
                break;
            }

            return(result);
        }