Package org.apache.commons.vfs2

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


                {
                    FileUtil.copyContent(srcFile, destFile);
                }
                else if (srcFile.getType().hasChildren())
                {
                    destFile.createFolder();
                }
            }
            catch (final IOException e)
            {
                throw new FileSystemException("vfs.provider/copy-file.error", e, srcFile, destFile);
View Full Code Here


            // Traverse up the heirarchy and make sure everything is a folder
            final FileObject parent = getParent();
            if (parent != null)
            {
                parent.createFolder();
            }

            try
            {
                // Create the folder
View Full Code Here

        {
// Does not exist - make sure parent does
            final FileObject parent = getParent();
            if (parent != null)
            {
                parent.createFolder();
            }
        }

// Get the raw output stream
        try
View Full Code Here

  }

  @Override
  public final boolean makeDirectory(final File dir) throws IOException {
    FileObject obj = base.resolveFile(dir.getPath());
    obj.createFolder();
    return true;
  }

  @Override
  public final boolean writeFileAttributes(final File file) throws IOException {
View Full Code Here

     */
    private void handleFiles() throws Exception
    {
        // Locate the destination folder, and make sure it exists
        final FileObject destFolder = resolveFile(destDirUrl);
        destFolder.createFolder();

        // Locate the source files, and make sure they exist
        FileName srcDirName = null;
        if (srcDirUrl != null)
        {
View Full Code Here

        try
        {
            final FileObject dir = resolveFile(dirName);
            final String message = Messages.getString("vfs.tasks/mkdir.create-folder.info", dir);
            log(message);
            dir.createFolder();
        }
        catch (final FileSystemException e)
        {
            throw new BuildException(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.