Tabnine Logo
FileWrapper.delete
Code IndexAdd Tabnine to your IDE (free)

How to use
delete
method
in
net.sourceforge.squirrel_sql.fw.util.FileWrapper

Best Java code snippets using net.sourceforge.squirrel_sql.fw.util.FileWrapper.delete (Showing top 8 results out of 315)

origin: net.sf.squirrel-sql/squirrel-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#copyDir(
 * net.sourceforge.squirrel_sql.fw.util.FileWrapper,
 *      java.lang.String, boolean, net.sourceforge.squirrel_sql.fw.util.FileWrapper)
 */
@Override
public void moveFiles(FileWrapper fromDir, String filePattern, boolean matchPattern, FileWrapper toDir)
  throws FileNotFoundException, IOException
{
  if (StringUtils.isEmpty(filePattern)) {
    throw new IllegalArgumentException("filePattern arg cannot be empty or null");
  }
  if (!fromDir.isDirectory()) { throw new IllegalArgumentException("Expected fromDir("
    + fromDir.getAbsolutePath() + ") to be a directory."); }
  if (!toDir.isDirectory()) { throw new IllegalArgumentException("Expected toDir("
    + toDir.getAbsolutePath() + ") to be a directory."); }
  List<FileWrapper> filesToMove = getFilterFileList(fromDir, filePattern, matchPattern);
  for (FileWrapper file : filesToMove) {
    copyFile(file, toDir);
    if (s_log.isDebugEnabled()) {
      s_log.debug("moveFiles: Attempting to delete file "+file.getAbsolutePath());
    }
    if (file.delete()) {
      s_log.error("moveFiles: Unable to delete file "+file.getAbsolutePath());
    }
    
  }
}

origin: realXuJiang/bigtable-sql

newFile.delete();
origin: net.sf.squirrel-sql/squirrel-sql

newFile.delete();
origin: realXuJiang/bigtable-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#copyDir(
 * net.sourceforge.squirrel_sql.fw.util.FileWrapper,
 *      java.lang.String, boolean, net.sourceforge.squirrel_sql.fw.util.FileWrapper)
 */
@Override
public void moveFiles(FileWrapper fromDir, String filePattern, boolean matchPattern, FileWrapper toDir)
  throws FileNotFoundException, IOException
{
  if (StringUtils.isEmpty(filePattern)) {
    throw new IllegalArgumentException("filePattern arg cannot be empty or null");
  }
  if (!fromDir.isDirectory()) { throw new IllegalArgumentException("Expected fromDir("
    + fromDir.getAbsolutePath() + ") to be a directory."); }
  if (!toDir.isDirectory()) { throw new IllegalArgumentException("Expected toDir("
    + toDir.getAbsolutePath() + ") to be a directory."); }
  List<FileWrapper> filesToMove = getFilterFileList(fromDir, filePattern, matchPattern);
  for (FileWrapper file : filesToMove) {
    copyFile(file, toDir);
    if (s_log.isDebugEnabled()) {
      s_log.debug("moveFiles: Attempting to delete file "+file.getAbsolutePath());
    }
    if (file.delete()) {
      s_log.error("moveFiles: Unable to delete file "+file.getAbsolutePath());
    }
    
  }
}

origin: net.sf.squirrel-sql/squirrel-sql

result = path.delete();
if (s_log.isInfoEnabled())
result = result && path.delete();
origin: realXuJiang/bigtable-sql

result = path.delete();
if (s_log.isInfoEnabled())
result = result && path.delete();
origin: net.sf.squirrel-sql.plugins/dbdiff

/**
 * @see net.sourceforge.squirrel_sql.plugins.dbdiff.IScriptFileManager#cleanupScriptFiles()
 */
public void cleanupScriptFiles()
{
  for (final String scriptFile : scriptFiles)
  {
    final FileWrapper fileWrapper = fileWrapperFactory.create(scriptFile);
    if (fileWrapper.exists())
    {
      if (s_log.isDebugEnabled())
      {
        s_log.debug("Attempting to delete previously created temporary script file: " + scriptFile);
      }
      fileWrapper.delete();
    }
    else
    {
      if (s_log.isDebugEnabled())
      {
        s_log.debug("Previously created temporary script file did not exist: " + scriptFile);
      }
    }
  }
}
origin: net.sf.squirrel-sql.plugins/laf

if (!oldPrefsFile.delete())
net.sourceforge.squirrel_sql.fw.utilFileWrapperdelete

Popular methods of FileWrapper

  • exists
  • getAbsolutePath
  • getPath
  • getFileWriter
  • isFile
  • list
  • listFiles
  • mkdir
  • mkdirs
  • toURI
  • canRead
  • deleteOnExit
  • canRead,
  • deleteOnExit,
  • getFileInputStream,
  • getName,
  • isDirectory,
  • lastModified,
  • length,
  • createNewFile,
  • getBufferedReader

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JCheckBox (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now