Updates the directory with the new file list.
775736
public void removeDirectory(String path,
                              String tail,
                              Result<Object> result)
  {
    // _dirRemove.exec(result, path, tail);
    result.ok(null);
  }
771756
def add(self, path):
        
        name_with_ext = os.path.split(path)[1]  # split directory and filename
        name = name_with_ext.split('.')[0]  # remove extension
        self.list.update({name: path})
1106556
def _muaprocessnew(self):
        """"""
        foldername = self._foldername("new")
        files = self.filesystem.listdir(foldername)
        for filename in files:
            if filename == "":
                continue
            curfilename = self._foldername(joinpath("new", filename))
            newfilename = joinpath(
                self._cur,
                "%s:2,%s" % (filename, "")
                )
            self.filesystem.rename(curfilename, newfilename)
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
244370
private void updateList(final File filename) {
        try {
            final URI reletivePath = toURI(filename.getAbsolutePath().substring(new File(normalize(tempDir.toString())).getPath().length() + 1));
            final FileInfo f = job.getOrCreateFileInfo(reletivePath);
            if (hasConref) {
                f.hasConref = true;
            }
            if (hasKeyref) {
                f.hasKeyref = true;
            }
            job.write();
        } catch (final RuntimeException e) {
            throw e;
        } catch (final Exception e) {
            logger.error(e.getMessage(), e) ;
        }
    }
26502
protected function updateFilenames(): void
    {
        $this->files->setFlags(\FilesystemIterator::KEY_AS_FILENAME
            | \FilesystemIterator::CURRENT_AS_FILEINFO
            | \FilesystemIterator::SKIP_DOTS);
        $this->filenames = array_keys(iterator_to_array($this->files));
    }
1327525
private void upgradeIfNeeded(File oldPidGenDir) throws IOException {
        if (oldPidGenDir != null && oldPidGenDir.isDirectory()) {
            String[] names = oldPidGenDir.list();
            Arrays.sort(names);
            if (names.length > 0) {
                BufferedReader in =
                        new BufferedReader(new InputStreamReader(new FileInputStream(new File(oldPidGenDir,
                                                                                              names[names.length - 1]))));
                String lastLine = null;
                String line;
                while ((line = in.readLine()) != null) {
                    lastLine = line;
                }
                in.close();
                if (lastLine != null) {
                    String[] parts = lastLine.split("|");
                    if (parts.length == 2) {
                        neverGeneratePID(parts[0]);
                    }
                }
            }
        }
    }
925916
private function appendCollectedFileAndChanges(): void
    {
        if (!empty($this->currentFile)) {
            foreach ($this->currentChanges as $change) {
                $this->currentFile->addChange($change);
            }
            $this->files[] = $this->currentFile;
        }
        $this->currentChanges = [];
    }
16623
void update() {
        Application.update(filter, list, main, footer, toggleAll, count, clearCompleted);
    }
900505
public void syncPersistNewDirectory(MutableInodeDirectory dir)
      throws InvalidPathException, FileDoesNotExistException, IOException {
    dir.setPersistenceState(PersistenceState.TO_BE_PERSISTED);
    syncPersistDirectory(dir).ifPresent(status -> {
      // If the directory already exists in the UFS, update our metadata to match the UFS.
      dir.setOwner(status.getOwner())
          .setGroup(status.getGroup())
          .setMode(status.getMode());

      Long lastModificationTime = status.getLastModifiedTime();
      if (lastModificationTime != null) {
        dir.setLastModificationTimeMs(lastModificationTime, true);
      }
    });
    dir.setPersistenceState(PersistenceState.PERSISTED);
  }
1107511
def addList(self, source_id, dir_path, is_recurcive=False, timestamp_reception=None, training_metadata=[]):
        """"""
        if not path.isdir(dir_path):
            raise ValueError(dir_path + ' is not a directory')
        files_to_send = _get_files_from_dir(dir_path, is_recurcive)
        succeed_upload = {}
        failed_upload = {}
        for file_path in files_to_send:
            try:
                resp = self.add(source_id=source_id,
                    file_path=file_path, profile_reference="",
                    timestamp_reception=timestamp_reception, training_metadata=training_metadata)
                if resp['code'] != 200 and resp['code'] != 201:
                    failed_upload[file_path] = ValueError('Invalid response: ' + str(resp))
                else:
                    succeed_upload[file_path] = resp
            except BaseException as e:
                failed_upload[file_path] = e
        result = {
            'success': succeed_upload,
            'fail': failed_upload
        }
        return result
672485
protected function update()
    {
        FileSystem::updateConfig();
        foreach (Daemon::$appInstances as $app) {
            foreach ($app as $appInstance) {
                $appInstance->handleStatus(AppInstance::EVENT_CONFIG_UPDATED);
            }
        }
    }
1311143
protected void updateCurrentFolder(Collection<CmsUUID> removeIds) {

        m_fileTable.update(removeIds, true);
        CmsObject cms = A_CmsUI.getCmsObject();
        try {
            // current folder may be filtered, so we clear the filters and restore them later
            // to make updates work for filtered out resources
            m_fileTable.saveFilters();
            m_fileTable.clearFilters();
            CmsResource folder = cms.readResource(m_currentFolder, FOLDERS);
            List<CmsResource> childResources = cms.readResources(cms.getSitePath(folder), FILES_N_FOLDERS, false);
            Set<CmsUUID> ids = new HashSet<CmsUUID>();
            for (CmsResource child : childResources) {
                ids.add(child.getStructureId());
            }
            m_fileTable.update(ids, false);
        } catch (CmsException e) {
            CmsErrorDialog.showErrorDialog(e);
            LOG.error(e.getLocalizedMessage(), e);
        } finally {
            m_fileTable.restoreFilters();
        }
    }
1035857
def refresh(self, new_path=None, force_current=False):
        """"""
        if new_path is None:
            new_path = getcwd_or_home()
        if force_current:
            index = self.set_current_folder(new_path)
            self.expand(index)
            self.setCurrentIndex(index)
        self.set_previous_enabled.emit(
                             self.histindex is not None and self.histindex > 0)
        self.set_next_enabled.emit(self.histindex is not None and \
                                   self.histindex < len(self.history)-1)
        # Disable the view of .spyproject. 
        self.filter_directories()
1105076
def update_system_path():
        """"""
        cwd = os.getcwd()
        lib_dir = os.path.join(os.getcwd(), 'lib_')
        lib_latest = os.path.join(os.getcwd(), 'lib_latest')

        # insert the lib_latest directory into the system Path if no other lib directory found. This
        # entry will be bumped to index 1 after adding the current working directory.
        if not [p for p in sys.path if lib_dir in p]:
            sys.path.insert(0, lib_latest)

        # insert the current working directory into the system Path for the App, ensuring that it is
        # always the first entry in the list.
        try:
            sys.path.remove(cwd)
        except ValueError:
            pass
        sys.path.insert(0, cwd)
864315
def on_moved(self, event):
        
        logger.debug("file moved: %s -> %s", event.src_path, event.dest_path)
        if not event.is_directory:
            self.update_file(event.dest_path)
1104419
private void addCurrentDirFiles(List<File> theFiles, List<File> theDirs, File currentDir) {
    File dirs[] = currentDir.listFiles(new FileFilter() {

      @Override
      public boolean accept(File file) {
        return file.isDirectory() && !file.getName().startsWith(".") && !file.getName().equals("META-INF");
      }
      
    });
    
    File htmlFiles[] = currentDir.listFiles(new FileFilter() {

      @Override
      public boolean accept(File file) {
        return !file.isDirectory() && file.isFile() && file.canRead() && !file.getName().startsWith(".") && (file.getName().endsWith(".html") || file.getName().endsWith(".htm"));
      }
      
    });
    
    if(dirs != null && dirs.length > 0) {
      theDirs.addAll(Arrays.asList(dirs));
    }
    if(htmlFiles != null && htmlFiles.length > 0) {
      theFiles.addAll(Arrays.asList(htmlFiles));
    }
  }