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

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

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

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

private void verifyDirectory(FileWrapper fromDir, FileWrapper toDir) {
  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."); }		
}

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

/**
 * TODO: move to IOUtilities
 * 
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#createZipFile(FileWrapper, FileWrapper[])
 */
public void createZipFile(FileWrapper zipFile, FileWrapper... sourceFiles) throws FileNotFoundException,
  IOException
{
  ZipOutputStream os = new ZipOutputStream(new FileOutputStream(zipFile.getAbsolutePath()));
  zipFileOs(os, sourceFiles);
  os.close();
}
origin: realXuJiang/bigtable-sql

/**
 * TODO: move to IOUtilities
 * 
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#createZipFile(FileWrapper, FileWrapper[])
 */
public void createZipFile(FileWrapper zipFile, FileWrapper... sourceFiles) throws FileNotFoundException,
  IOException
{
  ZipOutputStream os = new ZipOutputStream(new FileOutputStream(zipFile.getAbsolutePath()));
  zipFileOs(os, sourceFiles);
  os.close();
}
origin: realXuJiang/bigtable-sql

private void verifyDirectory(FileWrapper fromDir, FileWrapper toDir) {
  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."); }		
}

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

/**
 * @see net.sourceforge.squirrel_sql.client.plugin.IPlugin#getPluginJarFilePath()
 */
public synchronized String getPluginJarFilePath() throws IllegalStateException {
  final String internalName = getInternalName();
  final FileWrapper pluginDir = applicationFiles.getPluginsDirectory();
  if (internalName == null || internalName.trim().length() == 0)
  {
    throw new IllegalStateException("IPlugin doesn't have a valid internal name");
  }
  final FileWrapper resultFile = fileWrapperFactory.create(pluginDir, internalName + ".jar");
  return resultFile.getAbsolutePath();
}

origin: realXuJiang/bigtable-sql

/**
 * @see net.sourceforge.squirrel_sql.client.plugin.IPlugin#getPluginJarFilePath()
 */
public synchronized String getPluginJarFilePath() throws IllegalStateException {
  final String internalName = getInternalName();
  final FileWrapper pluginDir = applicationFiles.getPluginsDirectory();
  if (internalName == null || internalName.trim().length() == 0)
  {
    throw new IllegalStateException("IPlugin doesn't have a valid internal name");
  }
  final FileWrapper resultFile = fileWrapperFactory.create(pluginDir, internalName + ".jar");
  return resultFile.getAbsolutePath();
}

origin: realXuJiang/bigtable-sql

/**
* @see net.sourceforge.squirrel_sql.client.update.xmlbeans.UpdateXmlSerializer#write(net.sourceforge.squirrel_sql.client.update.xmlbeans.ChangeListXmlBean, net.sourceforge.squirrel_sql.fw.util.FileWrapper)
*/
public void write(ChangeListXmlBean changeBean, FileWrapper file)
   throws FileNotFoundException {
 XMLEncoder os = getXmlEncoder(file.getAbsolutePath());
 os.writeObject(changeBean);
 os.close();
}
origin: net.sf.squirrel-sql/squirrel-sql

/**
* @see net.sourceforge.squirrel_sql.client.update.xmlbeans.UpdateXmlSerializer#write(net.sourceforge.squirrel_sql.client.update.xmlbeans.ChangeListXmlBean, net.sourceforge.squirrel_sql.fw.util.FileWrapper)
*/
public void write(ChangeListXmlBean changeBean, FileWrapper file)
   throws FileNotFoundException {
 XMLEncoder os = getXmlEncoder(file.getAbsolutePath());
 os.writeObject(changeBean);
 os.close();
}
origin: realXuJiang/bigtable-sql

private String getArtifactDownloadDestDir(ArtifactStatus status)
{
  FileWrapper destDir = _util.getCoreDownloadsDir();
  if (UpdateUtil.PLUGIN_ARTIFACT_ID.equals(status.getType()))
  {
    destDir = _util.getPluginDownloadsDir();
  }
  if (UpdateUtil.TRANSLATION_ARTIFACT_ID.equals(status.getType()))
  {
    destDir = _util.getI18nDownloadsDir();
  }
  return destDir.getAbsolutePath();
}
origin: net.sf.squirrel-sql/squirrel-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#getSquirrelHomeDir()
 */
public FileWrapper getSquirrelHomeDir()
{
  FileWrapper squirrelHomeDir = _appFileWrappers.getSquirrelHomeDir();
  if (!squirrelHomeDir.isDirectory())
  {
    s_log.error("SQuirreL Home Directory (" + squirrelHomeDir.getAbsolutePath()
      + " doesn't appear to be a directory");
  }
  return squirrelHomeDir;
}
origin: net.sf.squirrel-sql/squirrel-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#getSquirrelLibraryDir()
 */
public FileWrapper getSquirrelLibraryDir()
{
  FileWrapper squirrelLibDir = _appFileWrappers.getLibraryDirectory();
  if (!squirrelLibDir.isDirectory())
  {
    s_log.error("SQuirreL Library Directory (" + squirrelLibDir.getAbsolutePath()
      + " doesn't appear to be a directory");
  }
  return squirrelLibDir;
}
origin: realXuJiang/bigtable-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#getSquirrelHomeDir()
 */
public FileWrapper getSquirrelHomeDir()
{
  FileWrapper squirrelHomeDir = _appFileWrappers.getSquirrelHomeDir();
  if (!squirrelHomeDir.isDirectory())
  {
    s_log.error("SQuirreL Home Directory (" + squirrelHomeDir.getAbsolutePath()
      + " doesn't appear to be a directory");
  }
  return squirrelHomeDir;
}
origin: realXuJiang/bigtable-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#getSquirrelPluginsDir()
 */
public FileWrapper getSquirrelPluginsDir()
{
  FileWrapper squirrelHomeDir = _appFileWrappers.getPluginsDirectory();
  if (!squirrelHomeDir.isDirectory())
  {
    s_log.error("SQuirreL Plugins Directory (" + squirrelHomeDir.getAbsolutePath()
      + " doesn't appear to be a directory");
  }
  return squirrelHomeDir;
}
origin: realXuJiang/bigtable-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#getSquirrelLibraryDir()
 */
public FileWrapper getSquirrelLibraryDir()
{
  FileWrapper squirrelLibDir = _appFileWrappers.getLibraryDirectory();
  if (!squirrelLibDir.isDirectory())
  {
    s_log.error("SQuirreL Library Directory (" + squirrelLibDir.getAbsolutePath()
      + " doesn't appear to be a directory");
  }
  return squirrelLibDir;
}
origin: net.sf.squirrel-sql/squirrel-sql

private String getArtifactDownloadDestDir(ArtifactStatus status)
{
  FileWrapper destDir = _util.getCoreDownloadsDir();
  if (UpdateUtil.PLUGIN_ARTIFACT_ID.equals(status.getType()))
  {
    destDir = _util.getPluginDownloadsDir();
  }
  if (UpdateUtil.TRANSLATION_ARTIFACT_ID.equals(status.getType()))
  {
    destDir = _util.getI18nDownloadsDir();
  }
  return destDir.getAbsolutePath();
}
origin: net.sf.squirrel-sql/squirrel-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#getSquirrelPluginsDir()
 */
public FileWrapper getSquirrelPluginsDir()
{
  FileWrapper squirrelHomeDir = _appFileWrappers.getPluginsDirectory();
  if (!squirrelHomeDir.isDirectory())
  {
    s_log.error("SQuirreL Plugins Directory (" + squirrelHomeDir.getAbsolutePath()
      + " doesn't appear to be a directory");
  }
  return squirrelHomeDir;
}
origin: net.sf.squirrel-sql.plugins/codecompletion

private void savePrefs()
{
  try
  {
    FileWrapper prefsFile =
      fileWrapperFactory.create(getPluginUserSettingsFolder().getAbsolutePath(), PREFS_FILE_NAME);
    final XMLBeanWriter wtr = new XMLBeanWriter(_newSessionPrefs);
    wtr.save(prefsFile);
  }
  catch (Exception e)
  {
    throw new RuntimeException(e);
  }
}
origin: realXuJiang/bigtable-sql

private void installFile(InstallFileOperationInfo info) throws IOException
{
  FileWrapper installDir = info.getInstallDir();
  FileWrapper fileToCopy = info.getFileToInstall();
  if (fileToCopy.getAbsolutePath().endsWith(".zip"))
  {
    // This file is a zip; it needs to be extracted into the install directory. All zips are packaged
    // in such a way that the extraction beneath install directory is all that is required.
    _util.extractZipFile(fileToCopy, installDir);
  }
  else
  {
    _util.copyFile(fileToCopy, installDir);
  }
}
origin: realXuJiang/bigtable-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#checkDir(FileWrapper, java.lang.String)
 */
public FileWrapper checkDir(FileWrapper parent, String child)
{
  FileWrapper dir = _fileWrapperFactory.create(parent, child);
  if (!dir.exists() && !dir.mkdir())
  {
    s_log.error("checkDir: Failed to mkdir - " + dir.getAbsolutePath());
  }
  return dir;
}
origin: net.sf.squirrel-sql/squirrel-sql

/**
 * @see net.sourceforge.squirrel_sql.client.update.UpdateUtil#checkDir(FileWrapper, java.lang.String)
 */
public FileWrapper checkDir(FileWrapper parent, String child)
{
  FileWrapper dir = _fileWrapperFactory.create(parent, child);
  if (!dir.exists() && !dir.mkdir())
  {
    s_log.error("checkDir: Failed to mkdir - " + dir.getAbsolutePath());
  }
  return dir;
}
net.sourceforge.squirrel_sql.fw.utilFileWrappergetAbsolutePath

Popular methods of FileWrapper

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

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • 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