Processes all the files associated with this Node. Files are downloaded if not present in the local storage.
        Creates and processes a NodeFile containing this Node's metadata.
        :return: A list of names of all the processed files.
169198
def process_files(self):
        
        file_names = []
        for f in self.files:
            file_names.append(f.process_file())

        if not self.has_thumbnail() and config.THUMBNAILS:
            file_names.append(self.derive_thumbnail())

        # node_file = NodeFile(self.to_dict())
        # self.hashed_file_name = node_file.process_file()
        # file_names.append(self.hashed_file_name)

        return file_names
389377
def download(name, filenames):
    '''
    
    '''
    with Session() as session:
        try:
            session.VFolder(name).download(filenames, show_progress=True)
            print_done('Done.')
        except Exception as e:
            print_error(e)
            sys.exit(1)
691487
def all_files(self):
        
        if self.files_command and not self.files:
            cmd = self.files_command
            files = shell_out(cmd, timeout=0, chroot=self.chroot)
            self.files = files.splitlines()
        return self.files
444384
def files(self):
        
        # If no files but a recursion option ==> use the current directory
        if not self.args.files and self.recursive:
            return ['.']
        else:
            return self.args.files
1081903
function(callback) {
    //process first all directories and then all files.
    async.mapSeries(['getDirectories', 'getFiles'], (nodeSource, cbMap) => {
      syncDb[nodeSource]((err, nodes) => {
        async.eachSeries(nodes, (node, cb) => {
          if(node.localActions && node.localActions.create) {
            var nodePath = utility.joinPath(node.parent, node.name);

            syncDb.findByPath(nodePath, (err, syncedNode) => {
              try {
                var stat = fsWrap.lstatSync(nodePath);
              } catch(e) {
                logger.warning('resolveConflicts got lstat error on node', {category: 'sync-local-delta', nodePath, code: e.code});
                throw new BlnDeltaError(e.message);
              }

              //deleted and recreated at same path
              if(syncedNode.localActions && syncedNode.localActions.delete) {
                syncedNode.ino = stat.ino;

                delete syncedNode.localActions.delete;

                if(syncedNode.directory) {
                  syncedNode.ctime = stat.ctime;
                  syncedNode.mtime = stat.mtime;
                  syncedNode.size = stat.size;
                } else {
                  syncedNode.localActions.create = node.localActions.create;
                }

                async.parallel([
                  (cbParallel) => {
                    syncDb.update(syncedNode._id, syncedNode, cbParallel);
                  },
                  (cbParallel) => {
                    syncDb.remove(node._id, cbParallel);
                  }
                ], cb);
              } else {
                cb(null);
              }
            });
          } else {
            cb(null);
          }
        }, cbMap);
      });
    }, callback);
  }
204772
def process(self):
        

        for locale in self._fields.keys():
            self._client._put(
                "{0}/files/{1}/process".format(
                    self.__class__.base_url(
                        self.space.id,
                        self.id,
                        environment_id=self._environment_id
                    ),
                    locale
                ),
                {},
                headers=self._update_headers()
            )
        return self.reload()
905372
function processFile (file, version, versions, targetVersions) {
  processTags(file.content, version, versions, file)
  processVersioned(file.content, version, versions)
  processVersionLists(file.content, version, targetVersions)
  return file
}
1017263
def retrieve_files():
    

    all_files = []
    for location in cfg.CONF.locations or []:
        # if local path then make sure it is absolute
        if not location.startswith('\\'):
            location = os.path.abspath(os.path.expanduser(location))

        LOG.debug('searching [%s]', location)
        for root, _, files in os.walk(location):
            LOG.debug('found file(s) %s', files)
            for name in files:
                filepath = os.path.join(root, name)
                if (os.access(filepath, os.R_OK) and
                        not _is_blacklisted_filename(filepath) and
                        _is_valid_extension(os.path.splitext(name)[1])):
                    all_files.append(filepath)

    return all_files
441350
def _process_output(self, node, **kwargs):
        
        for n in node.nodes:
            self._process_node(n, **kwargs)
1036524
def process_external_files(root_ast)
      loader = FileLoader.new(
        :directories  => configuration.directories,
        :ignore_paths => configuration.ignore_paths
      )

      nodes    = []
      comments = {}

      loader.iterate(root_ast)

      loader.nodes.each do |(ast, comment_associations)|
        nodes << ast

        comments.merge!(comment_associations)
      end

      return nodes, comments
    end
585176
def _load_names(self) -> List[str]:
        
        names = []
        for path in self._get_files():
            for name in self._get_names(path):
                names.append(self._normalize_name(name))
        return names
338695
def download_files(self, files):
        
        utils.pending_message(
            "Downloading {nfiles} file{plural}...".format(
                nfiles=len(files),
                plural='s' if len(files) > 1 else ''
            ))

        for file in files:
            if 'file_id' not in file:
                continue

            def build_callback(file):
                """Callback to save a download file result to a file on disk."""
                def file_callback(task):
                    device_name = self.devices[self.device_id]['device_name']
                    path_chunks = file['file_path'].split('/')

                    directory = os.path.join('files', device_name, *path_chunks[:-1])

                    filepath = utils.get_or_create_filepath(file['filename'], directory)

                    with open(filepath, 'wb') as out:
                        out.write(task.result)

                    if settings.getboolean('logging', 'time_profile'):
                        filepath = utils.append_profile_info(filepath, task.timer)

                    with indent(4):
                        utils.print_message(filepath)

                return file_callback

            self.client.download_file(
                account=self.account,
                device=self.device_id,
                file=file['file_id'],
                callback=build_callback(file)
            )
196925
def file_names(self) -> Iterable[str]:
        
        if self.is_sharded():
            yield from ShardedFile(self.filename_spec).get_filenames()
        elif self.filename_spec:
            yield self.filename_spec
238642
def files(self) -> List[str]:
        
        _all = []
        for path, _, files in os.walk(str(self.path)):
            if '.git' in path:
                continue
            for name in files:
                _all.append(os.path.join(path, name))
        return _all
854631
def _fetchAllChildren(self):
        
        childItems = []
        fileNames = os.listdir(self._fileName)
        absFileNames = [os.path.join(self._fileName, fn) for fn in fileNames]

        # Add subdirectories
        for fileName, absFileName in zip(fileNames, absFileNames):
            if os.path.isdir(absFileName) and not fileName.startswith('.'):
                childItems.append(DirectoryRti(fileName=absFileName, nodeName=fileName))

        # Add regular files
        for fileName, absFileName in zip(fileNames, absFileNames):
            if os.path.isfile(absFileName) and not fileName.startswith('.'):
                childItem = createRtiFromFileName(absFileName)
                childItems.append(childItem)

        return childItems
75785
def get_filenodes_generator(self):
        
        for topnode, dirs, files in self.walk():
            for node in files:
                yield node
51231
def load_files(self) -> selectiontools.Selections:
        
        devicetools.Node.clear_all()
        devicetools.Element.clear_all()
        selections = selectiontools.Selections()
        for (filename, path) in zip(self.filenames, self.filepaths):
            # Ensure both `Node` and `Element`start with a `fresh` memory.
            devicetools.Node.extract_new()
            devicetools.Element.extract_new()
            try:
                info = runpy.run_path(path)
            except BaseException:
                objecttools.augment_excmessage(
                    f'While trying to load the network file `{path}`')
            try:
                node: devicetools.Node = info['Node']
                element: devicetools.Element = info['Element']
                selections += selectiontools.Selection(
                    filename.split('.')[0],
                    node.extract_new(),
                    element.extract_new())
            except KeyError as exc:
                raise RuntimeError(
                    f'The class {exc.args[0]} cannot be loaded from the '
                    f'network file `{path}`.')

        selections += selectiontools.Selection(
            'complete',
            info['Node'].query_all(),
            info['Element'].query_all())
        return selections