org.apache.openejb.loader.FileUtils类的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(206)

本文整理了Java中org.apache.openejb.loader.FileUtils类的一些代码示例,展示了FileUtils类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils类的具体详情如下:
包路径:org.apache.openejb.loader.FileUtils
类名称:FileUtils

FileUtils介绍

暂无

代码示例

代码示例来源:origin: org.apache.tomee/openejb-loader

public File getDirectory(final String path) throws IOException {
  return getDirectory(path, false);
}

代码示例来源:origin: org.apache.tomee/openejb-loader

public File getFile(final String path) throws IOException {
  return getFile(path, true);
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-loader

private SystemInstance(Properties properties) throws Exception {
  this.components = new HashMap<Class, Object>();
  this.internalProperties.putAll(System.getProperties());
  this.internalProperties.putAll(properties);
  this.options = new Options(internalProperties, new Options(System.getProperties()));
  this.home = new FileUtils("openejb.home", "user.dir", this.internalProperties);
  this.base = new FileUtils("openejb.base", "openejb.home", this.internalProperties);
  this.classPath = ClassPathFactory.createClassPath(this.internalProperties.getProperty("openejb.loader", "context"));
  this.classLoader = classPath.getClassLoader();
  this.internalProperties.setProperty("openejb.home", home.getDirectory().getCanonicalPath());
  this.internalProperties.setProperty("openejb.base", base.getDirectory().getCanonicalPath());
  System.setProperty("derby.system.home", base.getDirectory().getCanonicalPath());
  // set the magic system property that causes derby to use explicity
  // file sync instead of relying on vm support for file open rws
  System.setProperty("derby.storage.fileSyncTransactionLog", "true");
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core

file = SystemInstance.get().getBase().getFile(path);
  if (file != null && file.exists() && file.isFile()) {
    return file.getAbsolutePath();
  file = SystemInstance.get().getHome().getFile(path);
  if (file != null && file.exists() && file.isFile()) {
    return file.getAbsolutePath();
  file = SystemInstance.get().getBase().getFile("conf/openejb.xml");
  if (file != null && file.exists() && file.isFile()) {
    return file.getAbsolutePath();
  file = SystemInstance.get().getBase().getFile("conf/openejb.conf");
  if (file != null && file.exists() && file.isFile()) {
    return file.getAbsolutePath();
File confDir = SystemInstance.get().getBase().getDirectory("conf", false);

代码示例来源:origin: org.apache.openejb/openejb-loader

public FileUtils getBase() {
  if (!isInitialized()) {
    return new FileUtils("openejb.base", "openejb.home", System.getProperties());
  }
  return base;
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-loader

public static File createTempDirectory() throws java.io.IOException {
  String prefix = System.getProperty("java.io.tmpdir", File.separator + "tmp") + File.separator + "openejb";
  return createTempDirectory(prefix);
}

代码示例来源:origin: org.apache.openejb/openejb-core

final File additionalDeploymentFile = SystemInstance.get().getBase().getFile(ADDITIONAL_DEPLOYMENTS, false);
  declaredAppsUrls.add(Files.path(base.getDirectory().getAbsoluteFile(), additionalDep.getFile()));
} else if (additionalDep.getDir() != null) {
  declaredAppsUrls.add(Files.path(base.getDirectory().getAbsoluteFile(), additionalDep.getDir()));

代码示例来源:origin: org.apache.tomee/openejb-loader

public FileUtils getBase() {
  if (!isInitialized()) {
    return new FileUtils("openejb.base", "openejb.home", System.getProperties());
  }
  return base;
}

代码示例来源:origin: org.apache.openejb/openejb-loader

public static File createTempDirectory() throws IOException {
  final String prefix = System.getProperty("java.io.tmpdir", File.separator + "tmp") + File.separator + "openejb";
  return createTempDirectory(prefix);
}

代码示例来源:origin: org.apache.openejb/openejb-loader

public File getDirectory(final String path) throws IOException {
  return getDirectory(path, false);
}

代码示例来源:origin: org.apache.tomee/openejb-core

final File additionalDeploymentFile = SystemInstance.get().getBase().getFile(ADDITIONAL_DEPLOYMENTS, false);
  declaredAppsUrls.add(Files.path(base.getDirectory().getAbsoluteFile(), additionalDep.getFile()));
} else if (additionalDep.getDir() != null) {
  declaredAppsUrls.add(Files.path(base.getDirectory().getAbsoluteFile(), additionalDep.getDir()));

代码示例来源:origin: org.apache.openejb/openejb-loader

this.home = new FileUtils("openejb.home", "user.dir", this.internalProperties);
this.base = new FileUtils("openejb.base", "openejb.home", this.internalProperties);
this.classPath = ClassPathFactory.createClassPath(this.internalProperties.getProperty("openejb.loader", "context"));
this.classLoader = classPath.getClassLoader();
this.internalProperties.setProperty("openejb.home", home.getDirectory().getCanonicalPath());
this.internalProperties.setProperty("openejb.base", base.getDirectory().getCanonicalPath());
System.setProperty("derby.system.home", System.getProperty("derby.system.home", base.getDirectory().getCanonicalPath()));

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-loader

public File getFile(String path) throws java.io.FileNotFoundException, java.io.IOException {
  return getFile(path, true);
}

代码示例来源:origin: org.apache.openejb/openejb-loader

public FileUtils getHome() {
  if (!isInitialized()) {
    return new FileUtils("openejb.home", "user.dir", System.getProperties());
  }
  return home;
}

代码示例来源:origin: org.apache.tomee/openejb-loader

public static File createTempDirectory() throws IOException {
  final String prefix = System.getProperty("java.io.tmpdir", File.separator + "tmp") + File.separator + "openejb";
  return createTempDirectory(prefix);
}

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-loader

public File getDirectory(String path) throws IOException {
  return getDirectory(path, false);
}

代码示例来源:origin: org.apache.tomee/openejb-loader

this.home = new FileUtils("openejb.home", "user.dir", this.internalProperties);
this.base = new FileUtils("openejb.base", "openejb.home", this.internalProperties);
this.classPath = ClassPathFactory.createClassPath(this.internalProperties.getProperty("openejb.loader", "context"));
this.classLoader = classPath.getClassLoader();
final String baseDirCanonicalPath;
try {
  homeDirCanonicalPath = home.getDirectory().getCanonicalPath();
  baseDirCanonicalPath = base.getDirectory().getCanonicalPath();
} catch (final IOException e) {
  throw new LoaderRuntimeException("Failed to create default instance of SystemInstance", e);

代码示例来源:origin: org.apache.openejb/openejb-loader

public File getFile(final String path) throws IOException {
  return getFile(path, true);
}

代码示例来源:origin: org.apache.tomee/openejb-loader

public FileUtils getHome() {
  if (!isInitialized()) {
    return new FileUtils("openejb.home", "user.dir", System.getProperties());
  }
  return home;
}

代码示例来源:origin: org.apache.tomee/openejb-loader

@Override
public boolean equals(final Object obj) {
  if (!(obj instanceof FileUtils)) {
    return false;
  }
  final FileUtils that = (FileUtils) obj;
  return this.getDirectory().equals(that.getDirectory());
}

相关文章