Lazy retrieval of list of locations with static files based on current tenant schema.
        :return: The list of static file dirs that have been configured for this tenant.
550670
def locations(self):
        
        if self._locations.get(connection.schema_name, None) is None:
            schema_locations = []
            for root in settings.MULTITENANT_STATICFILES_DIRS:
                root = utils.parse_tenant_config_path(root)

                if isinstance(root, (list, tuple)):
                    prefix, root = root
                else:
                    prefix = ""

                if (prefix, root) not in schema_locations:
                    schema_locations.append((prefix, root))

            self._locations[connection.schema_name] = schema_locations

        return self._locations[connection.schema_name]
559291
def find_schema_paths(schema_files_path=DEFAULT_SCHEMA_FILES_PATH):
    
    paths = []
    for path in schema_files_path:
        if os.path.isdir(path):
            paths.append(path)
    if paths:
        return paths
    raise SchemaFilesNotFound("Searched " + os.pathsep.join(schema_files_path))
1148104
def get_directories(self, request):
        

        queryset = self.folder.media_folder_children.all().order_by(*config.MEDIA_FOLDERS_ORDER_BY.split(","))

        paginator = Paginator(queryset, self.objects_per_page)

        page = request.GET.get('page', None)

        try:
            object_list = paginator.page(page)
        except PageNotAnInteger:

            if page == "all":
                object_list = queryset
            else:
                object_list = paginator.page(1)

        except EmptyPage:
            object_list = paginator.page(paginator.num_pages)

        return object_list
330021
def retrieve_static_files(dir, dot_static_files)
      theme_static_files = []
      dot_static_files.each do |file|
        theme_static_files << StaticFile.new(@site, dir, "/", file)
      end
      site.static_files.concat(theme_static_files)
    end
261087
def retrieve_static_files(dir, dot_static_files)
      site.static_files.concat(StaticFileReader.new(site, dir).read(dot_static_files))
    end
643786
def files(self):
        
        res = None
        if not res:
            res = glob.glob(self.path)
        if not res and self.is_glob:
            res = glob.glob(self.magic_path)
        if not res:
            res = glob.glob(self.alias)
        if not res:
            raise ValueError('No files match. %s' % self)
        return res
586456
def storages(self):
        
        if self._storages.get(connection.schema_name, None) is None:
            schema_storages = OrderedDict()

            for prefix, root in self.locations:
                filesystem_storage = TenantStaticFilesStorage(location=root)
                filesystem_storage.prefix = prefix
                schema_storages[root] = filesystem_storage

            self._storages[connection.schema_name] = schema_storages

        return self._storages[connection.schema_name]
1153183
def default_static_path():
    
    fdir = os.path.dirname(__file__)
    return os.path.abspath(os.path.join(fdir, '../assets/'))
37094
def folders(self):
        ''''''
        if self._folders is None :
            self.__init()
        if self._folders is not None and isinstance(self._folders, list):
            if len(self._folders) == 0:
                self._loadFolders()
        return self._folders
1032347
def find_files(self):
		
		all_files = self._invoke('locate', '-I', '.').splitlines()
		# now we have a list of all files in self.location relative to
		#  self.find_root()
		# Remove the parent dirs from them.
		from_root = os.path.relpath(self.location, self.find_root())
		loc_rel_paths = [
			os.path.relpath(path, from_root)
			for path in all_files]
		return loc_rel_paths
216369
def get_file_list(self):
        
        if os.path.isdir(self.root_path):
            return [os.path.join(self.root_path, f) for f in os.listdir(self.root_path)
                    if os.path.isfile(os.path.join(self.root_path, f))]
        else:
            return [self.root_path]
1039490
def get_static_directory():
    
    directory = templates_dir = os.path.join(os.path.dirname(__file__), 'static')
    return directory
392609
List<File> getFiles() {
        List<File> list = new ArrayList<File>();
        for (String sDirectory : config.getDirectories()) {
            if (sDirectory != null) {
                File directory = getDirectory(sDirectory);
                File[] aFiles = directory.listFiles(config.getFilenameFilter());
                if (aFiles != null) {
                    list.addAll(Arrays.asList(aFiles));
                }
            }
        }
        return list;
    }
19999
def list_files(directory):
    '''
    
    '''
    ret = set()
    ret.add(directory)
    for root, dirs, files in safe_walk(directory):
        for name in files:
            ret.add(os.path.join(root, name))
        for name in dirs:
            ret.add(os.path.join(root, name))

    return list(ret)
1127935
def list_locations(self):
        
        known = self.defaults.get_known_locations()
        for default in self.defaults.distdefault:
            if default not in known:
                known.add(default)
        if not known:
            err_exit('No locations', 0)
        for location in sorted(known):
            if location in self.defaults.distdefault:
                print(location, '(default)')
            else:
                print(location)
        sys.exit(0)
1344075
def dir_names(self, connId='default'):
        
        files_list = []
        thisConn = self.__getConnection(connId)
        try:
            files_list = thisConn.nlst()
        except:
            files_list = []
        return files_list
600288
def search_path(self):
        
        return [os.path.dirname(self._record.file_path)] + self.category.search_path