Returns all active (published) file type sets
13481
public function getActiveFileTypeSets(DataContainer $dc)
  {
    $arrFileTypeSets = array();
    
    $objFileTypeSets = $this->Database->prepare("SELECT * FROM tl_dms_file_type_sets WHERE published = 1 ORDER BY name")
                ->execute();
    
    while($objFileTypeSets->next())
    {
      $arrFileTypeSets[$objFileTypeSets->id] = $objFileTypeSets->name . "<span style=\"color:#b3b3b3; padding-left:3px;\">[" . \ContaoDMS\DmsUtils::getCuttedAllowedFileTypes($objFileTypeSets->file_types) .  "]</span>";
    }
    
    return $arrFileTypeSets;
  }
572138
@Override
    public Set<String> findAllJobTypes() {
        return stream(collection.find().maxTime(500, TimeUnit.MILLISECONDS).spliterator(), false)
                .map(doc -> doc.getString(ID))
                .collect(toSet());
    }
1003564
function getCurrentActiveType (version) {
  let typelist = TypeList
  for (let i = 0; i < typelist.length; i++) {
    if (semver[typelist[i]](version)) {
      return typelist[i]
    }
  }
}
874918
def files(self):
        ''''''
        try:
            cur = self.conn.cursor()
            cur.execute(
                'SELECT id, item FROM workflows WHERE entry_type = "tracked_files"'
            )
            return [(x[0], eval(x[1])) for x in cur.fetchall()]
        except sqlite3.DatabaseError as e:
            env.logger.warning(
                f'Failed to get files from signature database: {e}')
            return []
376845
def all(self):
        
        url = "{url_base}/resource/{pid}/files/".format(url_base=self.hs.url_base,
                                                                 pid=self.pid)
        r = self.hs._request('GET', url)
        return r
584872
def get_published_list(
        self, search='', start=0, limit=0, order_by='', order_by_dir='ASC'
    ):
        
        return self.get_list(
            search=search,
            start=start,
            limit=limit,
            order_by=order_by,
            order_by_dir=order_by_dir,
            published_only=True
        )
797630
def findall(self):
        
        from stat import S_ISREG, S_ISDIR, S_ISLNK

        self.allfiles = allfiles = []
        root = self.base
        stack = [root]
        pop = stack.pop
        push = stack.append

        while stack:
            root = pop()
            names = os.listdir(root)

            for name in names:
                fullname = os.path.join(root, name)

                # Avoid excess stat calls -- just one will do, thank you!
                stat = os.stat(fullname)
                mode = stat.st_mode
                if S_ISREG(mode):
                    allfiles.append(fsdecode(fullname))
                elif S_ISDIR(mode) and not S_ISLNK(mode):
                    push(fullname)
571614
def get_files_information(self):
        
        for k in self.get_files():
            yield k, self.get_files_types()[k], self.get_files_crc32()[k]
204337
def get_files_types(self):
        
        if self._files == {}:
            # Generate File Types / CRC List
            for i in self.get_files():
                buffer = self.zip.read(i)
                self.files_crc32[i] = crc32(buffer)
                # FIXME why not use the crc from the zipfile?
                # should be validated as well.
                # crc = self.zip.getinfo(i).CRC
                self._files[i] = self._get_file_magic_name(buffer)

        return self._files
632101
def all_active(cls):
        

        prefix = context.get_current_config()["redis_prefix"]
        queues = []
        for key in context.connections.redis.keys():
            if key.startswith(prefix):
                queues.append(Queue(key[len(prefix) + 3:]))

        return queues
1338993
def _get_filesystem_types(args, sample_file):
    
    out = set([])
    ext = "" if args.no_container else "_container"
    with open(sample_file) as in_handle:
        for f in _get_file_paths(json.load(in_handle)):
            if f.startswith("gs:"):
                out.add("gcp%s" % ext)
            elif f.startswith("s3:"):
                out.add("s3%s" % ext)
            elif f.startswith(("https:", "http:")):
                out.add("http%s" % ext)
            else:
                out.add("local%s" % ext)
    return out
241839
public function getAllowedFileTypes()
	{
		$arrFileTypesOfParents = array();
		
		if ($this->fileTypesInherit && !$this->isRootCategory() && $this->hasParentCategory())
		{
			$arrFileTypesOfParents = $this->parentCategory->getAllowedFileTypes();
		}
		
		$arrFileTypes = DmsUtils::getUniqueFileTypes($this->fileTypes, $arrFileTypesOfParents);
		
		return $arrFileTypes;
	}
1240936
def _get_unmanaged_files(self, managed, system_all):
        '''
        
        '''
        m_files, m_dirs, m_links = managed
        s_files, s_dirs, s_links = system_all

        return (sorted(list(set(s_files).difference(m_files))),
                sorted(list(set(s_dirs).difference(m_dirs))),
                sorted(list(set(s_links).difference(m_links))))
956723
def rw_active(self):
        """"""
        result = False
        for disk in self.disks:
            result = disk.rw_active() or result
        return result
181050
def files(self):
        """"""
        if self._files is None:
            fifo = SeriesFolder._search_files(self.path)
            self._files = [ff[0] for ff in fifo]
            self._formats = [ff[1] for ff in fifo]
        return self._files
36610
def _show_psrs():
    
    sep = os.linesep

    types = "Supported types: " + ", ".join(API.list_types())
    cids = "IDs: " + ", ".join(c for c, _ps in API.list_by_cid())

    x_vs_ps = ["  %s: %s" % (x, ", ".join(p.cid() for p in ps))
               for x, ps in API.list_by_extension()]
    exts = "File extensions:" + sep + sep.join(x_vs_ps)

    _exit_with_output(sep.join([types, exts, cids]))
183456
private void gatherMetatypeFilesAndStats() throws IOException, JAXBException {
        for (File bundle : directory.listFiles()) {
            if (bundle.isFile()) {
                analyzeBundle(bundle);
            }
        }
    }