本文整理了Java中org.apache.flink.util.FileUtils.guardIfWindows()
方法的一些代码示例,展示了FileUtils.guardIfWindows()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.guardIfWindows()
方法的具体详情如下:
包路径:org.apache.flink.util.FileUtils
类名称:FileUtils
方法名:guardIfWindows
暂无
代码示例来源:origin: apache/flink
/**
* Removes the given file or directory recursively.
*
* <p>If the file or directory does not exist, this does not throw an exception, but simply does nothing.
* It considers the fact that a file-to-be-deleted is not present a success.
*
* <p>This method is safe against other concurrent deletion attempts.
*
* @param file The file or directory to delete.
*
* @throws IOException Thrown if the directory could not be cleaned for some reason, for example
* due to missing access/write permissions.
*/
public static void deleteFileOrDirectory(File file) throws IOException {
checkNotNull(file, "file");
guardIfWindows(FileUtils::deleteFileOrDirectoryInternal, file);
}
代码示例来源:origin: apache/flink
/**
* Deletes the given directory recursively.
*
* <p>If the directory does not exist, this does not throw an exception, but simply does nothing.
* It considers the fact that a directory-to-be-deleted is not present a success.
*
* <p>This method is safe against other concurrent deletion attempts.
*
* @param directory The directory to be deleted.
* @throws IOException Thrown if the given file is not a directory, or if the directory could not be
* deleted for some reason, for example due to missing access/write permissions.
*/
public static void deleteDirectory(File directory) throws IOException {
checkNotNull(directory, "directory");
guardIfWindows(FileUtils::deleteDirectoryInternal, directory);
}
代码示例来源:origin: apache/flink
/**
* Removes all files contained within a directory, without removing the directory itself.
*
* <p>This method is safe against other concurrent deletion attempts.
*
* @param directory The directory to remove all files from.
*
* @throws FileNotFoundException Thrown if the directory itself does not exist.
* @throws IOException Thrown if the file indicates a proper file and not a directory, or if
* the directory could not be cleaned for some reason, for example
* due to missing access/write permissions.
*/
public static void cleanDirectory(File directory) throws IOException {
checkNotNull(directory, "directory");
guardIfWindows(FileUtils::cleanDirectoryInternal, directory);
}
代码示例来源:origin: com.alibaba.blink/flink-core
/**
* Removes the given file or directory recursively.
*
* <p>If the file or directory does not exist, this does not throw an exception, but simply does nothing.
* It considers the fact that a file-to-be-deleted is not present a success.
*
* <p>This method is safe against other concurrent deletion attempts.
*
* @param file The file or directory to delete.
*
* @throws IOException Thrown if the directory could not be cleaned for some reason, for example
* due to missing access/write permissions.
*/
public static void deleteFileOrDirectory(File file) throws IOException {
checkNotNull(file, "file");
guardIfWindows(FileUtils::deleteFileOrDirectoryInternal, file);
}
代码示例来源:origin: org.apache.flink/flink-core
/**
* Removes all files contained within a directory, without removing the directory itself.
*
* <p>This method is safe against other concurrent deletion attempts.
*
* @param directory The directory to remove all files from.
*
* @throws FileNotFoundException Thrown if the directory itself does not exist.
* @throws IOException Thrown if the file indicates a proper file and not a directory, or if
* the directory could not be cleaned for some reason, for example
* due to missing access/write permissions.
*/
public static void cleanDirectory(File directory) throws IOException {
checkNotNull(directory, "directory");
guardIfWindows(FileUtils::cleanDirectoryInternal, directory);
}
代码示例来源:origin: org.apache.flink/flink-core
/**
* Deletes the given directory recursively.
*
* <p>If the directory does not exist, this does not throw an exception, but simply does nothing.
* It considers the fact that a directory-to-be-deleted is not present a success.
*
* <p>This method is safe against other concurrent deletion attempts.
*
* @param directory The directory to be deleted.
* @throws IOException Thrown if the given file is not a directory, or if the directory could not be
* deleted for some reason, for example due to missing access/write permissions.
*/
public static void deleteDirectory(File directory) throws IOException {
checkNotNull(directory, "directory");
guardIfWindows(FileUtils::deleteDirectoryInternal, directory);
}
代码示例来源:origin: com.alibaba.blink/flink-core
/**
* Deletes the given directory recursively.
*
* <p>If the directory does not exist, this does not throw an exception, but simply does nothing.
* It considers the fact that a directory-to-be-deleted is not present a success.
*
* <p>This method is safe against other concurrent deletion attempts.
*
* @param directory The directory to be deleted.
* @throws IOException Thrown if the given file is not a directory, or if the directory could not be
* deleted for some reason, for example due to missing access/write permissions.
*/
public static void deleteDirectory(File directory) throws IOException {
checkNotNull(directory, "directory");
guardIfWindows(FileUtils::deleteDirectoryInternal, directory);
}
代码示例来源:origin: com.alibaba.blink/flink-core
/**
* Removes all files contained within a directory, without removing the directory itself.
*
* <p>This method is safe against other concurrent deletion attempts.
*
* @param directory The directory to remove all files from.
*
* @throws FileNotFoundException Thrown if the directory itself does not exist.
* @throws IOException Thrown if the file indicates a proper file and not a directory, or if
* the directory could not be cleaned for some reason, for example
* due to missing access/write permissions.
*/
public static void cleanDirectory(File directory) throws IOException {
checkNotNull(directory, "directory");
guardIfWindows(FileUtils::cleanDirectoryInternal, directory);
}
代码示例来源:origin: org.apache.flink/flink-core
/**
* Removes the given file or directory recursively.
*
* <p>If the file or directory does not exist, this does not throw an exception, but simply does nothing.
* It considers the fact that a file-to-be-deleted is not present a success.
*
* <p>This method is safe against other concurrent deletion attempts.
*
* @param file The file or directory to delete.
*
* @throws IOException Thrown if the directory could not be cleaned for some reason, for example
* due to missing access/write permissions.
*/
public static void deleteFileOrDirectory(File file) throws IOException {
checkNotNull(file, "file");
guardIfWindows(FileUtils::deleteFileOrDirectoryInternal, file);
}
内容来源于网络,如有侵权,请联系作者删除!