Retrieve all the static files from the current directory,
 add them to the site and sort them.

 dir - The directory retrieve the static files from.
 dot_static_files - The static files in the dir.

 Returns nothing.
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
91949
def load(self, patterns, dirs, ignore=None):
        
        for dir_ in dirs:
            dir_root = dir_
            if os.path.exists(os.path.join(dir_, "__init__.py")):
                dir_root = os.path.abspath(os.path.join(dir_, os.pardir))

            for path in self.find_files(patterns=patterns, dirs=[dir_], ignore=ignore):
                data = self.read_file(path=path)
                if data:
                    data["relative_path"] = os.path.relpath(path, dir_root)
                    self.paths[path] = data
1306153
function(){
		STATIC_FILES.forEach(function(file){
			addFile(fs.createReadStream(__dirname + '/templates/' + file), { name: file });
		});
	}
794215
private static void getFilesAndDirs(File dir, List<File> list) {
        File[] files = dir.listFiles();
        for (File element : files) {
            list.add(element);
            if (element.isDirectory()) {
                getFilesAndDirs(element, list);
            }
        }
    }
1075168
def _walk_directory(root_directory):
        

        paths = [os.path.join(root, name)
                 for root, dirs, files in os.walk(root_directory)  # noqa
                 for name in files]
        paths.sort()
        return paths
548479
def static(self, uri, file_or_directory, *args, **kwargs):
        
        static = FutureStatic(uri, file_or_directory, args, kwargs)
        self.statics.append(static)
264598
private function loadStaticFiles(){

		$staticDir = $this->registry->get("_staticDir");

		$staticDir = str_replace("\\", "/", $staticDir);

		if(!empty($staticDir)){

			$dItr = new \RecursiveDirectoryIterator($staticDir);
			$rItrItr  = new \RecursiveIteratorIterator($dItr, \RecursiveIteratorIterator::SELF_FIRST);

			foreach ($rItrItr as $file) {

			    $path = $file->getRealPath();

			    if ($file->isFile()){

			    	$path = str_replace("\\", "/", $path);
			    	$shortUrl = str_replace($staticDir, "", $path);

			    	$mimeTypes = $this->registry->get("mimeTypes");

			    	$ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));

		        	if(in_array($ext, array_keys($mimeTypes))){

		        		$res = $this->registry->get("Response.Ok")->exec();
		        		$res->headers->set('Content-Type', $mimeTypes[$ext]);
						$res->setContent(Fs::cat($path));
		        	}
		        	else{

		        		$res = $this->registry->get("Response.Forbidden")->exec();
		        	}

			        $this->get($shortUrl, function() use($res, $mimeTypes){

			        	return $res;
			        });
			    }
			}
		}
	}
1102660
private static function file()
    {
        $files = ['File', 'Filesystem'];
        $folder = static::$root.'Filesystem'.'/';

        self::call($files, $folder);

        $files = ['FileNotFoundException', 'DirectoryNotFoundException'];
        $folder = static::$root.'Filesystem/Exceptions'.'/';

        self::call($files, $folder);
    }
1225883
public static function all()
    {
        $it = new DirectoryIterator(themes_path());
        $it->rewind();

        $result = [];
        foreach ($it as $fileinfo) {
            if (!$fileinfo->isDir() || $fileinfo->isDot()) {
                continue;
            }

            $theme = static::load($fileinfo->getFilename());

            $result[] = $theme;
        }

        return $result;
    }
1325036
def select_files_from_directory(self, directory=None):
        
        filenames = []
        if directory is None:
            directory = ''
        for pattern in self.file_patterns:
            matching = glob.iglob(os.path.join(directory, globify(pattern)))
            filenames.extend(matching)
        return filenames
648791
public function dir_readdir()
    {
        $current = current($this->listing);
        next($this->listing);

        return $current ? $current['path'] : false;
    }
810754
public static File mkdirs(File dir) throws IOException {
        try {
            return Files.createDirectories(fileToPath(dir)).toFile();
        } catch (UnsupportedOperationException e) {
            throw new IOException(e);
        }
    }
408773
function getFiles(dir) {
    var files = [];

    var traverse = function (dir) {
        var dirList = dir.listFiles();
        dirList.forEach(function (file) {
            if (/\.css$/.test(file)) {
                files.push(file);
            } else if (file.isDirectory()) {
                traverse(file);
            }
        });
    };

    traverse(dir);

    return files;
}
554899
def sort_files!
      site.collections.values.each { |c| c.docs.sort! }
      site.pages.sort_by!(&:name)
      site.static_files.sort_by!(&:relative_path)
    end
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
382463
def dir_files(dir)
      Find.find(dir).to_a.reject!{|f| File.directory?(f) }
    end
1009570
function getFolders(dir) {
  try {
    return fs.readdirSync(dir)
      .filter(function (file) {
        return exports.isDirectory(path.join(dir, file));
      });
  } catch (ex) {
    return [];
  }
}