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