public static bool SafeExists(this ZlpFileOrDirectoryInfo i)
 {
     if (i == null || i.IsEmpty)
     {
         return(false);
     }
     else if (i.IsDirectory)
     {
         return(ZlpSafeFileOperations.SafeDirectoryExists(i.Directory));
     }
     else if (i.IsFile)
     {
         return(ZlpSafeFileOperations.SafeFileExists(i.File));
     }
     else
     {
         return(false);
     }
 }
예제 #2
0
 public static ZlpDirectoryInfo SafeDelete(this ZlpDirectoryInfo folderPath)
 {
     ZlpSafeFileOperations.SafeDeleteDirectory(folderPath);
     return(folderPath);
 }
예제 #3
0
 public static ZlpFileInfo SafeCopy(this ZlpFileInfo sourcePath, ZlpFileInfo dstFilePath, bool overwrite = true)
 {
     ZlpSafeFileOperations.SafeCopyFile(sourcePath, dstFilePath, overwrite);
     return(sourcePath);
 }
예제 #4
0
 public static ZlpFileInfo SafeMove(this ZlpFileInfo sourcePath, ZlpFileInfo dstFilePath)
 {
     ZlpSafeFileOperations.SafeMoveFile(sourcePath, dstFilePath);
     return(sourcePath);
 }
예제 #5
0
 public static bool SafeExists(this ZlpFileInfo filePath)
 {
     return(ZlpSafeFileOperations.SafeFileExists(filePath));
 }
예제 #6
0
 public static bool SafeExists(this ZlpDirectoryInfo folderPath)
 {
     return(ZlpSafeFileOperations.SafeDirectoryExists(folderPath));
 }
예제 #7
0
 public static ZlpFileInfo SafeDelete(this ZlpFileInfo filePath)
 {
     ZlpSafeFileOperations.SafeDeleteFile(filePath);
     return(filePath);
 }