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);
     }
 }
Exemplo n.º 2
0
 public static ZlpDirectoryInfo SafeDelete(this ZlpDirectoryInfo folderPath)
 {
     ZlpSafeFileOperations.SafeDeleteDirectory(folderPath);
     return(folderPath);
 }
Exemplo n.º 3
0
 public static ZlpFileInfo SafeCopy(this ZlpFileInfo sourcePath, ZlpFileInfo dstFilePath, bool overwrite = true)
 {
     ZlpSafeFileOperations.SafeCopyFile(sourcePath, dstFilePath, overwrite);
     return(sourcePath);
 }
Exemplo n.º 4
0
 public static ZlpFileInfo SafeMove(this ZlpFileInfo sourcePath, ZlpFileInfo dstFilePath)
 {
     ZlpSafeFileOperations.SafeMoveFile(sourcePath, dstFilePath);
     return(sourcePath);
 }
Exemplo n.º 5
0
 public static bool SafeExists(this ZlpFileInfo filePath)
 {
     return(ZlpSafeFileOperations.SafeFileExists(filePath));
 }
Exemplo n.º 6
0
 public static bool SafeExists(this ZlpDirectoryInfo folderPath)
 {
     return(ZlpSafeFileOperations.SafeDirectoryExists(folderPath));
 }
Exemplo n.º 7
0
 public static ZlpFileInfo SafeDelete(this ZlpFileInfo filePath)
 {
     ZlpSafeFileOperations.SafeDeleteFile(filePath);
     return(filePath);
 }