Examples of resolveFile()


Examples of org.apache.commons.vfs.FileSystem.resolveFile()

        // Add the junction
        fs.addJunction("/a/b", baseDir);

        // Make sure the file at the junction point and its ancestors exist
        file = fs.resolveFile("/a/b");
        assertTrue("Does not exist", file.exists());
        file = file.getParent();
        assertTrue("Does not exist", file.exists());
        file = file.getParent();
        assertTrue("Does not exist", file.exists());
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemManager.resolveFile()

    if (_properties == null) {
      TemporaryFile tempFile = null;
      try {       
        tempFile = new TemporaryFile("template_" + _name, getContent(), WGADesignerPlugin.getDefault().getStateLocation().toFile());
        FileSystemManager fsManager = VFS.getManager();
        FileObject propFile = fsManager.resolveFile("zip:" + tempFile.getFile().toURI() + "!" + PROPERTIES_FILENAME);
        if (propFile.exists()) {
          _properties = new Properties();
          InputStream propIn = null;
          try {
            propIn = propFile.getContent().getInputStream();
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemManager.resolveFile()

  public void createOrUpdateDefaultDeployment(File defaultWGAWar, IProgressMonitor monitor) throws FileSystemException, IOException, ZipException {
    if (monitor == null) {
      monitor = new NullProgressMonitor();
    }
    FileSystemManager fsManager = VFS.getManager();
    FileObject propFile = fsManager.resolveFile( "zip:" + defaultWGAWar.toURI() + "!/WEB-INF/wgabuild.properties");
    //_defaultDeploymentName = DEFAULT_DEPLOYMENT_PREFIX + WGADeployment.determineWGAVersion(propFile.getURL().openStream(), "_", true, false);
       
    // init default wga installation
    // check if we already have a deployment with same major, minor version
    WGADeployment existingDefaultDeployment = getDeployment(DEFAULT_DEPLOYMENT_NAME);
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemManager.resolveFile()

  public static boolean isWGAVersionSupported(File wgaWar) {
    InputStream propIn = null;
    try {
      FileSystemManager fsManager = VFS.getManager();
      FileObject propFile = fsManager.resolveFile( "zip:" + wgaWar.toURI() + "!/WEB-INF/wgabuild.properties");
      propIn = propFile.getURL().openStream();
      Version version = WGADeployment.determineWGAVersion(propIn);
      if (version != null) {
        if (version.isAtLeast(Activator.SUPPORTED_WGA_VERSION_MIN.getMajor(),  Activator.SUPPORTED_WGA_VERSION_MIN.getMinor())) {
          if (version.getMajorVersion() < Activator.SUPPORTED_WGA_VERSION_MAX.getMajor()) {
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemManager.resolveFile()

            try
            {
                FileSystemManager mgr = VFS.getManager();
                System.out.println();
                System.out.println("Parsing: " + args[i]);
                FileObject file = mgr.resolveFile(args[i]);
                System.out.println("URL: " + file.getURL());
                System.out.println("getName(): " + file.getName());
                System.out.println("BaseName: " + file.getName().getBaseName());
                System.out.println("Extension: " + file.getName().getExtension());
                System.out.println("Path: " + file.getName().getPath());
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemManager.resolveFile()

  public static void main(String[] args) throws FileSystemException
  {
    FileSystemManager mgr = VFS.getManager();

    FileObject root = mgr
        .resolveFile("smb://HOME\\vfsusr:vfs%2f%25\\te:st@10.0.1.54/vfsusr");
    FileName rootName = root.getName();
 
    testNames(mgr, rootName);
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemManager.resolveFile()

    FileSystemManager fsManager = VFS.getManager();
    for (String jar : _jar2class.keySet())
    {
      FileObject jarFile;
      if (jar.endsWith(".jar"))
        jarFile = fsManager.resolveFile( "jar:"+jar );
      else
        jarFile = fsManager.resolveFile( jar );
       
        for (String file : _jar2class.get(jar))
        {
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemManager.resolveFile()

    {
      FileObject jarFile;
      if (jar.endsWith(".jar"))
        jarFile = fsManager.resolveFile( "jar:"+jar );
      else
        jarFile = fsManager.resolveFile( jar );
       
        for (String file : _jar2class.get(jar))
        {
          file = file.replaceAll("\\.", "/");
          file += ".class";
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemManager.resolveFile()

       
        for (String file : _jar2class.get(jar))
        {
          file = file.replaceAll("\\.", "/");
          file += ".class";
          FileObject f = fsManager.resolveFile(jarFile, file);
          if (f.exists())
            addFile(f, file, out);
          else
            System.out.println("file not found "+f);
       
View Full Code Here

Examples of org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile()

    //@Test
    public void testCopyFrom() throws Exception {
        String srbGsiUri = "srb://" + srbGsiHost + ":" + srbGsiPort+"/ngs/home/david-meredith.ngs/test.txt";
        DefaultFileSystemManager fsManager = this.getFsManager()
        FileSystemOptions opts = this.createFileSystemOptions();
        FileObject to = fsManager.resolveFile(srbGsiUri, opts);
        assertTrue(to.exists());
       
        String localFile = "file:///tmp/from.txt";
        FileObject from = fsManager.resolveFile(localFile);
        assertTrue(from.exists());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.