Searches for marker files in the specified archive.

        Docker marker files are files taht have the .wh. prefix in the name.
        These files mark the corresponding file to be removed (hidden) when
        we start a container from the image.
423245
def _marker_files(self, tar, members):
        
        marker_files = {}

        self.log.debug(
            "Searching for marker files in '%s' archive..." % tar.name)

        for member in members:
            if '.wh.' in member.name:
                self.log.debug("Found '%s' marker file" % member.name)
                marker_files[member] = tar.extractfile(member)

        self.log.debug("Done, found %s files" % len(marker_files))

        return marker_files
397004
Marker addMarker() {
    if (!lazyInitDocumentation()) {
      return null;
    }

    if (documentation.markers == null) {
      documentation.markers = new ArrayList<>();
    }

    Marker marker = new Marker();
    documentation.markers.add(marker);
    return marker;
  }
979605
def get_custom_container_files():
    

    def is_special_file(name):
        return name.startswith('.')

    res = []

    top = infer_config_base_dir()/'containers'
    for root, dirnames, files in os.walk(top):
        for name in filter(is_special_file, dirnames):
            dirnames.remove(name)

        res.extend(
            [
                os.path.join(root, name) for name in files
                if not is_special_file(name) and name.endswith('.json')
            ])

    return res
1104388
def AvailableTools(path, tools=None, branch='master', version='HEAD', core=False):
    
    def get_dockerfiles(matches, path, tool=None):
        for root, _, filenames in walk(path):
            files = fnmatch.filter(filenames, 'Dockerfile*')
            # append additional identifiers to tools if multiple in same
            # directory
            add_info = len(files) > 1
            for f in files:
                if core and 'core' not in root:
                    pass
                else:
                    addtl_info = ''
                    if add_info:
                        # @ will be delimiter symbol for multi-tools
                        try:
                            addtl_info = '@' + f.split('.')[1]
                        except Exception as e:
                            addtl_info = '@unspecified'
                    if tool:
                        if root.split(path)[1].rsplit('/', 1)[-1].lower() == tool:
                            matches.append((root.split(path)[1] + addtl_info,
                                            version))
                        elif tool == '@':
                            matches.append(('' + addtl_info, version))
                    else:
                        matches.append(
                            (root.split(path)[1] + addtl_info, version))
        return matches

    matches = []
    if tools:
        for tool in tools:
            name = tool[0]
            branch = tool[1]
            version = tool[2]
            status = Checkout(path, branch=branch, version=version)
            if not status[0]:
                logger.error('Unable to checkout: {0} {1} {2} because: {3}'.format(
                    path, branch, version, status[1]))
            matches = get_dockerfiles(matches, path, tool=name)
    else:
        status = Checkout(path, branch=branch, version=version)
        if not status[0]:
            logger.error('Unable to checkout: {0} {1} {2} because: {3}'.format(
                path, branch, version, status[1]))
        matches = get_dockerfiles(matches, path)
    return matches
1350885
def list_files(self, prefix, flat):
    

    layer_path = self.get_path_to_file("")        
    path = os.path.join(layer_path, prefix) + '*'

    filenames = []

    remove = layer_path
    if len(remove) and remove[-1] != '/':
      remove += '/'

    if flat:
      for file_path in glob(path):
        if not os.path.isfile(file_path):
          continue
        filename = file_path.replace(remove, '')
        filenames.append(filename)
    else:
      subdir = os.path.join(layer_path, os.path.dirname(prefix))
      for root, dirs, files in os.walk(subdir):
        files = [ os.path.join(root, f) for f in files ]
        files = [ f.replace(remove, '') for f in files ]
        files = [ f for f in files if f[:len(prefix)] == prefix ]
        
        for filename in files:
          filenames.append(filename)
    
    def stripgz(fname):
      (base, ext) = os.path.splitext(fname)
      if ext == '.gz':
        return base
      else:
        return fname

    filenames = list(map(stripgz, filenames))
    return _radix_sort(filenames).__iter__()
315393
def __search(self):
        

        self.__search_results = []

        editorsFiles = self.__container.default_target in self.__location.targets and \
                       [editor.file for editor in self.__container.script_editor.list_editors()] or []
        self.__search_editors_files(editorsFiles)

        self.__search_files(self.__location.files)

        for directory in self.__location.directories:
            if self.__interrupt:
                return

            files_walker = foundations.walkers.files_walker(directory,
                                                            self.__location.filters_in,
                                                            list(itertools.chain(self.__location.filters_out,
                                                                                 self.__location.files,
                                                                                 editorsFiles)))
            self.__search_files(files_walker)

        not self.__interrupt and self.searchFinished.emit(self.__search_results)
357717
public static File [] getFilesWithPrefix(File dir, final String prefix) {
        FileFilter prefixFilter = new FileFilter() {
                public boolean accept(File pathname)
                {
                    return pathname.getName().toLowerCase().
                        startsWith(prefix.toLowerCase());
                }
            };
        return dir.listFiles(prefixFilter);
    }
10051
function (prefix, callback, marker, contents) {

			var search = {
				Prefix: prefix, 
				Bucket: options.bucket
			};

			if (marker) {
				search.Marker = marker;
			}

			s3.listObjects(search, function (err, list) { 

				if (!err) {

					var objects = (contents) ? contents.concat(list.Contents) : list.Contents;

					if (list.IsTruncated) {
						var new_marker = _.last(list.Contents).Key;
						listObjects(prefix, callback, new_marker, objects);
					}
					else {
						callback(_.uniq(objects, function (o) { return o.Key; }));
					}
				}
				else {
					grunt.fatal('Failed to list content of bucket ' + options.bucket + '\n' + err);
				}
			});
		}
1017605
private void writeCompletionFile() {
        File completionFile = getCompletionFile();
        try {
            if (completionFile.createNewFile()) {
                log.info("successfully created completion marker file: {}",
                         completionFile.getAbsolutePath());
            } else {
                log.warn("completion marker file unexpectably exists already " +
                         "- something may be amiss: {}",
                         completionFile.getAbsolutePath());

            }
        } catch (IOException e) {
            log.error("Unable to create the completion file {}: {}",
                      completionFile.getAbsolutePath(),
                      e.getMessage());
        }
    }
1186389
def markers():
    ''' 
    '''
    print("Available markers: \n\n - " + "\n - ".join(list(MarkerType)))
    print()
    print("Shortcuts: \n\n" + "\n".join(" %r: %s" % item for item in _MARKER_SHORTCUTS.items()))
696281
private function findMarkers()
    {
        $matches = [];

        preg_match_all(
            '/###([A-Z0-9_]+)###/',
            $this->templateCode,
            $matches
        );

        $this->markerNames = array_unique($matches[1]);
        foreach ($this->markerNames as $markerName) {
            if (strpos($markerName, 'LABEL_') === 0) {
                $this->labelMarkerNames[] = strtolower($markerName);
            }
        }
    }
802141
def return_markers(self, trigger_bits=8, trigger_zero=True):
        
        nev_file = splitext(self.filename)[0] + '.nev'
        markers = _read_neuralev(nev_file, read_markers=True)

        if trigger_bits == 8:
            to8 = lambda x: str(int(x) - (256 ** 2 - 256))
            for m in markers:
                m['name'] = to8(m['name'])

        if trigger_zero:
            no_zero = (i for i, m in enumerate(markers) if m['name'] != '0')

            markers_no_zero = []
            for i in no_zero:
                if (i + 1) < len(markers) and markers[i + 1]['name'] == '0':
                    markers[i]['end'] = markers[i + 1]['start']
                markers_no_zero.append(markers[i])

        return markers_no_zero
603326
async def container_dump(self, container, container_type, params=None):
        
        await self.container_size(len(container), container_type, params)

        elem_type = x.container_elem_type(container_type, params)
        for idx, elem in enumerate(container):
            try:
                self.tracker.push_index(idx)
                await self._dump_field(elem, elem_type, params[1:] if params else None)
                self.tracker.pop()
            except Exception as e:
                raise helpers.ArchiveException(e, tracker=self.tracker) from e
256817
function getMarkerLines(
  loc: NodeLocation,
  source: Array<string>,
  opts: Object,
): { start: number, end: number, markerLines: Object }
288641
def filter_archives(ctx, prefix, pattern, engine):
    '''
    
    '''

    _generate_api(ctx)

    # want to achieve behavior like click.echo(' '.join(matches))

    for i, match in enumerate(ctx.obj.api.filter(
            pattern, engine, prefix=prefix)):

        click.echo(match, nl=False)
        print('')
362138
private boolean startsWithUtf8Marker(CmsResource res) {

        boolean result = false;
        try {
            if (res.isFile()) {
                CmsFile file = m_cms.readFile(res);
                if ((file.getContents().length >= 3)
                    && (file.getContents()[0] == CmsResourceWrapperUtils.UTF8_MARKER[0])
                    && (file.getContents()[1] == CmsResourceWrapperUtils.UTF8_MARKER[1])
                    && (file.getContents()[2] == CmsResourceWrapperUtils.UTF8_MARKER[2])) {
                    result = true;
                }
            }
        } catch (CmsException e) {
            LOG.debug(e);
        }
        return result;
    }
38936
def dockerfile_lines(self):
        
        w1 = colored(
                'WARNING: this build includes files that are built in other images!!! The generated'
                '\n         Dockerfile must be built in a directory that contains'
                ' the file/directory:',
                'red', attrs=['bold'])
        w2 = colored('         ' + self.sourcepath, 'red')
        w3 = (colored('         from image ', 'red')
              + colored(self.sourcepath, 'blue', attrs=['bold']))
        print('\n'.join((w1, w2, w3)))
        return ["",
                "# Warning: the file \"%s\" from the image \"%s\""
                " must be present in this build context!!" %
                (self.sourcepath, self.sourceimage),
                "ADD %s %s" % (os.path.basename(self.sourcepath), self.destpath),
                '']