Adds all the files to the list of successfully uploaded files.
This will automatically remove them from the params.getFiles() list.
335054
protected final void addAllFilesToSuccessfullyUploadedFiles() {
        for (Iterator<UploadFile> iterator = params.files.iterator(); iterator.hasNext(); ) {
            UploadFile file = iterator.next();

            if (!successfullyUploadedFiles.contains(file.path)) {
                successfullyUploadedFiles.add(file.path);
            }
            iterator.remove();
        }
    }
410991
def update_input(filelist, ivmlist=None, removed_files=None):
    
    newfilelist = []

    if removed_files == []:
        return filelist, ivmlist
    else:
        sci_ivm = list(zip(filelist, ivmlist))
        for f in removed_files:
            result=[sci_ivm.remove(t) for t in sci_ivm if t[0] == f ]
        ivmlist = [el[1] for el in sci_ivm]
        newfilelist = [el[0] for el in sci_ivm]
        return newfilelist, ivmlist
1298403
private List<File> listFiles(File file, List<File> files) {
        File[] children = file.listFiles();
        
        if (children != null) {
            for (File child : children) {
                files.add(child);
                listFiles(child, files);
            }
        }
        
        return files;
    }
510898
protected function addFile()
    {
        if (!$this->isError()) {
            $id = $this->file->add($this->getSubmitted());
            if (empty($id)) {
                $this->errorAndExit($this->text('Unexpected result'));
            }
            $this->line($id);
        }
    }
478577
private void listFiles(File dir, List<File> results) {
        File[] found = dir.listFiles();
        if ( found != null ) {
            for ( File f : found ) {
                if (f.isDirectory()) {
                	//do nothing
                } else {
                    results.add(f);
                }
            }
        }
    }
306221
public function upload_files()
    {
        $adapter    = new GoogleDriveAdapter($this->service, Cache::get('folder_id'));
        $filesystem = new Filesystem($adapter);

        // here we are uploading files from local storage
        // we first get all the files
        $files = Storage::files();

        // loop over the found files
        foreach ($files as $file) {
            // remove file from google drive in case we have something under the same name
            // comment out if its okay to have files under the same name
            $this->remove_duplicated($file);

            // read the file content
            $read = Storage::get($file);
            // save to google drive
            $filesystem->write($file, $read);
            // remove the local file
            Storage::delete($file);
        }
    }
166704
public function findFiles()
    {
        $files = $this->getFilesystemDisk()->listContents($this->getFilesPath());
        foreach ($files as $fileData) {
            $this->addNewFileFromArray($fileData);
        }
    }
1199114
function addFiles (formData, files) {
    var file, arr, key, i = 0, filename;

    for (key in files) {
        if (files.hasOwnProperty(key) && files[key]) {

            if (files[key] instanceof Array) {
                arr = files[key];
                filename = getFilename(arr[i]) || null;

                for (i = 0; i < arr.length; i += 1) {
                    formData.append(key + '[' + i + ']', arr[i]);
                }
            } else {
                file = files[key];
                filename = getFilename(file) || null;
                formData.append(key, file, filename);
            }
        }
    }
}
594913
public void addFile(final FileWidgetUpload file) {
		List<FileWidgetUpload> files = (List<FileWidgetUpload>) getData();
		if (files == null) {
			files = new ArrayList<>();
			setData(files);
		}
		files.add(file);
		MemoryUtil.checkSize(files.size(), this.getClass().getSimpleName());
	}
1331263
List<File> addCollectionFiles(File newBasedir) {
        final DirectoryScanner ds = new DirectoryScanner();
        ds.setBasedir(newBasedir);
        if (this.includes != null && this.includes.length > 0) {
            ds.setIncludes(this.includes);
        } else {
            ds.setIncludes(DEFAULT_INCLUDES);
        }

        ds.setExcludes(this.excludes);
        ds.addDefaultExcludes();
        ds.setCaseSensitive(false);
        ds.setFollowSymlinks(false);
        ds.scan();

        List<File> foundFiles = new ArrayList<>();
        for (String filename : ds.getIncludedFiles()) {
            foundFiles.add(new File(newBasedir, filename));
        }
        return foundFiles;
    }
126842
protected void uploadFile() {

        hideOkAndUploadButtons();
        CmsUploader uploader = new CmsUploader();
        CmsFileInfo info = m_fileInput.getFiles()[0];
        info.setOverrideFileName(
            CmsStringUtil.joinPaths(m_handler.getTargetFolderPath(), m_handler.getFileName(info.getFileName())));
        uploader.uploadFiles(
            CmsCoreProvider.get().link(I_CmsUploadConstants.UPLOAD_ACTION_JSP_URI),
            CmsResource.getFolderPath(m_handler.getTargetFolderPath()),
            true,
            Collections.singletonList(info),
            Collections.<String> emptyList(),
            this);
        showProgress();
    }
318758
private void addFilesFromDir(File dir) {
    File[] files = dir.listFiles();
    for (int i = 0; i < files.length; i++) {
      if (!files[i].isDirectory()) {
        mFiles.add(files[i]);
      } else if (mRecursive) {
        addFilesFromDir(files[i]);
      }
    }
  }
574684
private void appendFileDetails(final StringBuffer buf, final WMultiFileWidget fileWidget) {
		List<FileWidgetUpload> files = fileWidget.getFiles();

		if (files != null) {
			for (FileWidgetUpload file : files) {
				String streamedSize;

				try {
					InputStream in = file.getFile().getInputStream();

					int size = 0;
					while (in.read() >= 0) {
						size++;
					}

					streamedSize = String.valueOf(size);
				} catch (IOException e) {
					streamedSize = e.getMessage();
				}

				buf.append("Name: ").append(file.getFile().getName());
				buf.append("\nSize: ").append(streamedSize).append(" bytes\n\n");
			}
		}
	}
489737
public function save()
	{
		if (self::$file_added)
			file_put_contents($this->getFileListName(), '<?php return ' . var_export(self::$files[$this->prefix], true) . ';');

		self::$file_added = false;
	}
152043
public List<File> getAllFiles() {
		List<File> files = new ArrayList<File>();
		collectFiles(folder, files);
		Collections.sort(files, LastModifiedFileComparator.INSTANCE);
		return files;
	}
1069356
public void addAll(ClassLoaderFiles files) {
		Assert.notNull(files, "Files must not be null");
		for (SourceFolder folder : files.getSourceFolders()) {
			for (Map.Entry<String, ClassLoaderFile> entry : folder.getFilesEntrySet()) {
				addFile(folder.getName(), entry.getKey(), entry.getValue());
			}
		}
	}
1036249
def add(self, files):
    
    if files.__class__.__name__ == 'str':
      self._files.append(files)
    else:
      self._files.extend(files)