Opens the upload dialog with the given file references to upload.<p>

@param files the file references
973772
private void openUploadWithFiles(JavaScriptObject files) {

        JsArray<CmsFileInfo> cmsFiles = files.cast();
        List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>();
        for (int i = 0; i < cmsFiles.length(); ++i) {
            fileObjects.add(cmsFiles.get(i));
        }
        CmsDialogUploadButtonHandler buttonHandler = new CmsDialogUploadButtonHandler(
            new Supplier<I_CmsUploadContext>() {

                /**
                 * @see com.google.common.base.Supplier#get()
                 */
                public I_CmsUploadContext get() {

                    return new I_CmsUploadContext() {

                        public void onUploadFinished(List<String> uploadedFiles) {

                            uploadFinished(uploadedFiles);
                        }

                    };
                }
            });
        buttonHandler.setIsTargetRootPath(true);
        buttonHandler.setTargetFolder(getState().getTargetFolderRootPath());
        buttonHandler.openDialogWithFiles(fileObjects);
    }
154800
private void createResources(CmsUploadListener listener) throws CmsException, UnsupportedEncodingException {

        CmsObject cms = getCmsObject();
        String[] isRootPathVals = m_parameterMap.get(I_CmsUploadConstants.UPLOAD_IS_ROOT_PATH_FIELD_NAME);
        if ((isRootPathVals != null) && (isRootPathVals.length > 0) && Boolean.parseBoolean(isRootPathVals[0])) {
            cms = m_rootCms;
        }
        // get the target folder
        String targetFolder = getTargetFolder(cms);
        m_uploadHook = OpenCms.getWorkplaceManager().getUploadHook(cms, targetFolder);

        List<String> filesToUnzip = getFilesToUnzip();

        // iterate over the list of files to upload and create each single resource
        for (FileItem fileItem : m_multiPartFileItems) {
            if ((fileItem != null) && (!fileItem.isFormField())) {
                // read the content of the file
                byte[] content = fileItem.get();
                fileItem.delete();

                // determine the new resource name
                String fileName = m_parameterMap.get(
                    fileItem.getFieldName() + I_CmsUploadConstants.UPLOAD_FILENAME_ENCODED_SUFFIX)[0];
                fileName = URLDecoder.decode(fileName, "UTF-8");

                if (filesToUnzip.contains(CmsResource.getName(fileName.replace('\\', '/')))) {
                    // import the zip
                    CmsImportFolder importZip = new CmsImportFolder();
                    try {
                        importZip.importZip(content, targetFolder, cms, false);
                    } finally {
                        // get the created resource names
                        for (CmsResource importedResource : importZip.getImportedResources()) {
                            m_resourcesCreated.put(
                                importedResource.getStructureId().toString(),
                                importedResource.getName());
                        }
                    }
                } else {
                    // create the resource
                    CmsResource importedResource = createSingleResource(cms, fileName, targetFolder, content);
                    // add the name of the created resource to the list of successful created resources
                    m_resourcesCreated.put(importedResource.getStructureId().toString(), importedResource.getName());
                }

                if (listener.isCanceled()) {
                    throw listener.getException();
                }
            }
        }
    }
961577
private void loadFiles() {
		m_filesMap = new HashMap<String, FileInfo>();
		List<ColumnValue> list = m_helper.get(m_storeName, m_row, "File/");
		for(ColumnValue v : list) {
			FileInfo fi = new FileInfo(v.columnName, v.getString());
			m_filesMap.put(fi.getName(), fi); 
		}
	}
186330
protected void restart(Set<URL> urls, ClassLoaderFiles files) {
		Restarter restarter = Restarter.getInstance();
		restarter.addUrls(urls);
		restarter.addClassLoaderFiles(files);
		restarter.restart();
	}
21992
@Override
	public boolean upload(String path, File file) {
		Assert.notNull(file, "file to upload is null !");
		return upload(path, file.getName(), file);
	}
137415
private static void openDialog(String uploadTarget) {

        try {
            A_CmsUploadDialog dialog = GWT.create(CmsUploadDialogImpl.class);
            dialog.setContext(new I_CmsUploadContext() {

                public void onUploadFinished(List<String> uploadedFiles) {

                    Window.Location.reload();
                }
            });
            dialog.setTargetFolder(uploadTarget);
            dialog.loadAndShow();
        } catch (Exception e) {
            CmsErrorDialog.handleException(
                new Exception(
                    "Deserialization of dialog data failed. This may be caused by expired java-script resources, please clear your browser cache and try again.",
                    e));
        }
    }
845459
public void doOpenFile(File[] files)
	{
	    if (files!=null)
	    {
	    	if (files.length==1)
	    	{
	    		File f = files[0];
		    	if (f.isFile())
		    	{
			    	String modFileName = f.getAbsolutePath();
			    	int i = modFileName.lastIndexOf(File.separatorChar);
			    	searchPath = modFileName.substring(0, i);
		    		loadMultimediaOrPlayListFile(Helpers.createURLfromFile(f)); 
		    	}
		    	else
		    	if (f.isDirectory())
		    	{
			    	searchPath = f.getAbsolutePath();
		    	}
	    	}
	    	else
	    	{
	    		playlistRecieved(null, PlayList.createNewListWithFiles(files, false, false), null);
	    	}
	    }
	}
438182
public void openFile() throws IOException {

        // get the import resource
        m_folder = new File(OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(m_params.getPath()));

        // if it is a file it must be a zip-file
        if (m_folder.isFile()) {
            m_zipFile = new ZipFile(m_params.getPath());
            m_folder = null;
        }
    }
492468
public void addFile(String filename) {
        synchronized (files) {
            if (!files.contains(filename)) {
                files.add(filename);
            }
        }
    }
273702
public static void addFileOpener(ServletContext servletContext, FileOpener fileOpener, String ... extensions) {
		synchronized(fileOpenersLock) {
			@SuppressWarnings("unchecked")
			Map<String,FileOpener> fileOpeners = (Map<String,FileOpener>)servletContext.getAttribute(FILE_OPENERS_REQUEST_ATTRIBUTE_NAME);
			if(fileOpeners == null) {
				fileOpeners = new HashMap<>();
				servletContext.setAttribute(FILE_OPENERS_REQUEST_ATTRIBUTE_NAME, fileOpeners);
			}
			for(String extension : extensions) {
				if(fileOpeners.containsKey(extension)) throw new IllegalStateException("File opener already registered: " + extension);
				fileOpeners.put(extension, fileOpener);
			}
		}
	}
1012887
@Override
    protected void addFileInput(CmsFileInput fileInput) {

        // add the files selected by the user to the list of files to upload
        if (fileInput != null) {
            m_inputsToUpload.put(fileInput.getFiles()[0].getFileName(), fileInput);
        }
        super.addFileInput(fileInput);
    }
350100
@Override
	public void openImageSet(String ...files ) {
		synchronized (lockProcessing) {
			if( processing ) {
				JOptionPane.showMessageDialog(this, "Still processing");
				return;
			}
		}
		// disable the menu until it finish processing the images
		setMenuBarEnabled(false);
		super.openImageSet(files);
	}
201995
function uploadFiles(files) {
    var index = 0,
        file = files[index];

    /**
    * Recursive helper used as callback for server.raw(put)
    * @param {error} err - Error message if something went wrong
    */
    var processFile = function processFile (err) {
      if (err) {
        grunt.log.warn(messages.fileTransferFail(file.dest, err));
      } else {
        grunt.log.ok(messages.fileTransferSuccess(file.dest));
      }

      ++index;
      // If there are more files, then keep pushing
      if (index < files.length) {
        file = files[index];
        server.put(grunt.file.read(file.src, { encoding: null }), file.dest, processFile);
      } else {
        // Close the connection, we are complete
        server.raw('quit', function(quitErr) {
          if (quitErr) {
            grunt.log.error(quitErr);
            done(false);
          }
          server.destroy();
          grunt.log.ok(messages.connectionClosed);
          done();
        });
      }
    };

    // Start uploading files
    server.put(grunt.file.read(file.src, { encoding: null }), file.dest, processFile);
  }
213638
public void setUploads(java.util.Collection<Upload> uploads) {
        if (uploads == null) {
            this.uploads = null;
            return;
        }

        this.uploads = new java.util.ArrayList<Upload>(uploads);
    }
183430
public function handleUploadFiles($files)
    {
        $dir = $this->getFileManager()->getDir();

        /** @var FileManagerDriver $driver */
        $driver = $this->container->get('youwe.file_manager.driver');

        $this->getFileManager()->event(YouweFileManagerEvents::BEFORE_FILE_UPLOADED);
        
        /** @var UploadedFile $file */
        foreach ($files as $file) {
            $extension = $file->guessExtension();
            if (!$extension) {
                $extension = 'bin';
            }

            if (in_array($file->getClientMimeType(), $this->getFileManager()->getExtensionsAllowed())) {
                $driver->handleUploadedFiles($file, $extension, $dir);
            } else {
                $this->getFileManager()->throwError("Mimetype is not allowed", 500);
            }
        }

        $this->getFileManager()->event(YouweFileManagerEvents::AFTER_FILE_UPLOADED);
    }
1036249
def add(self, files):
    
    if files.__class__.__name__ == 'str':
      self._files.append(files)
    else:
      self._files.extend(files)
1053909
private void processFiles(File[] files) {
        phaseOutput(format("=== %s ===", getApplicationName()));
        phaseOutput(format("Compiling %d BEL Document(s)", files.length));

        boolean pedantic = withPedantic();
        boolean verbose = withVerbose();

        int validated = 0;

        for (int i = 1; i <= files.length; i++) {
            File file = files[i - 1];

            if (verbose) {
                phaseOutput("Compiling " + i + " of " + files.length
                        + " BEL Document(s)");
            }

            // validate document
            Document document = stage1(file);
            if (document == null) {
                if (pedantic) {
                    bail(VALIDATION_FAILURE);
                }
                continue;
            }
            validated++;

            // run stages 2 - 7
            runCommonStages(pedantic, document);
        }

        if (validated == 0) {
            bail(NO_VALID_DOCUMENTS);
        }
    }