Package org.apache.commons.vfs

Examples of org.apache.commons.vfs.FileObject.createFolder()


        FileObject dummyDataDirSrc = relativeToFOSrc.resolveFile(dummyFileDirName);
        assertEquals(FileType.FOLDER, dummyDataDirSrc.getType());

        // create the same directory on the target (but not the whole heirarchy)
        FileObject dummyDataDirCopy = relativeToFODest.resolveFile(dummyFileDirName);
        dummyDataDirCopy.createFolder();
        assertEquals(FileType.FOLDER, dummyDataDirCopy.getType());

        // copy the source data to the target
        VFSUtil.copy(dummyDataDirSrc, dummyDataDirCopy,new MarkerListenerImpl(), doThirdPartyTransferForTwoGridFtpFileObjects);
View Full Code Here


        // create a new directory heirarchy relative to 'relativeToFO'
        FileObject fo3 = relativeToFO.resolveFile(dummyFileDirName);
        if (!fo3.exists()) {
            // ok, 'dummyFileDirName' dir does not already exist so can
            // continue to create the folder and files with and without content
            fo3.createFolder();

            content = "a text can delete me";
            newFileCreation = this.createFileWithDummyContent(fo3, "a_.txt", content);
            if (assertContent) {
                this.assertSameContent(content, newFileCreation);
View Full Code Here

            FileObject answer = fileSystemManager.resolveFile(path);
            if (answer == null) {
                throw new JBIException("Could not resolve file: " + path);
            }
            try {
                answer.createFolder();
            }
            catch (FileSystemException e) {
                throw new JBIException("Failed to create folder: " + e, e);
            }
            return answer;
View Full Code Here

                              final String path,
                              final String name,
                              final String description) throws IOException
  {
    final FileObject fileObject = repositoryRoot.getFileSystem().resolveFile(solution + '/' + path + '/' + name);
    fileObject.createFolder();
  }

  public boolean exists(final String path)
  {
    // todo:
View Full Code Here

          if (child instanceof WebSolutionFileObject)
          {
            final WebSolutionFileObject webSolutionFileObject = (WebSolutionFileObject) child;
            webSolutionFileObject.setDescription(newFolderDialog.getDescription());
          }
          child.createFolder();
          getTable().refresh();
        }
        catch (Exception e1)
        {
          UncaughtExceptionsModel.getInstance().addException(e1);
View Full Code Here

          if (child instanceof WebSolutionFileObject)
          {
            final WebSolutionFileObject webSolutionFileObject = (WebSolutionFileObject) child;
            webSolutionFileObject.setDescription(newFolderDialog.getDescription());
          }
          child.createFolder();
          repositoryTreeModel.fireTreeDataChanged();
          repositoryBrowser.setSelectionPath(selectionPath.getParentPath().pathByAddingChild(child));
          setDirty(true);
        }
        catch (Exception e1)
View Full Code Here

        String resourcePath = resource.getURL().getPath();
        if (!resourcePath.startsWith(basePath)) {
          throw new WGAServiceException(new IllegalArgumentException("Illegal design resource path '" + path + "'."));
        }

        resource.createFolder();
      } catch (FileSystemException e) {
        throw new WGAServiceException("Creating of FSDesignDir '" + path + "' failed.", e);
      }
    }
   
View Full Code Here

            // Create the folder
            FileObject designDir = _dir.resolveFile(designName);
            if (designDir.exists()) {
                throw new WGADesignCreationException("A directory of name '" + designName + "' already exists");
            }
            designDir.createFolder();
           
            // Nuffin else to do .... initial deploy will do the rest
        }
        catch (Exception e) {
            throw new WGADesignCreationException("Exception creating file system design '" + designName + "'", e);
View Full Code Here

    private FileObject getOrCreateMetadataDir() throws FileSystemException, WGDesignSyncException {
        FileObject metadataDir = getMetadataDir();
       
        if (!metadataDir.exists() && metadataDir.getFileSystem().hasCapability(Capability.CREATE)) {
            metadataDir.createFolder();
        }
   
        return metadataDir;
    }
View Full Code Here

        for (int i = 0; i < path.size() - 1; i++) {
            currentDir = currentDir.resolveFile((String) path.get(i));
            if (!currentDir.exists()) {
                _log.info("Creating script category directory" + getRelativePath(currentDir));
                try {
                    currentDir.createFolder();
                }
                catch (FileSystemException e) {
                    throw new WGInitialDeployException("Could not create script category folder '" + getRelativePath(currentDir) + "'", e);
                }
            }
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.