本文整理了Java中org.apache.maven.shared.utils.io.FileUtils.forceDelete()
方法的一些代码示例,展示了FileUtils.forceDelete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.forceDelete()
方法的具体详情如下:
包路径:org.apache.maven.shared.utils.io.FileUtils
类名称:FileUtils
方法名:forceDelete
[英]Delete a file. If file is directory delete it and all sub-directories.
[中]删除一个文件。如果文件是目录,则删除它和所有子目录。
代码示例来源:origin: org.apache.maven.shared/file-management
/**
* Delete a file
*
* @param f a file
*/
private boolean delete( File f )
{
try
{
FileUtils.forceDelete( f );
}
catch ( IOException e )
{
return false;
}
return true;
}
代码示例来源:origin: org.apache.maven.shared/maven-shared-utils
/**
* Delete a file. If file is directory delete it and all sub-directories.
*
* @param file the file path
* @throws IOException if any
*/
public static void forceDelete( @Nonnull final String file )
throws IOException
{
forceDelete( new File( file ) );
}
代码示例来源:origin: org.apache.maven.shared/maven-verifier
public void deleteArtifact( String org, String name, String version, String ext )
throws IOException
{
List<String> files = getArtifactFileNameList( org, name, version, ext );
for ( String fileName : files )
{
FileUtils.forceDelete( new File( fileName ) );
}
}
代码示例来源:origin: org.apache.maven.shared/maven-shared-utils
forceDelete( file );
内容来源于网络,如有侵权,请联系作者删除!