Retrieve a folder by its title
        
        Usage: C{engine.get_folder(title)}
        
        Note that if more than one folder has the same title, only the first match will be
        returned.
964473
def get_folder(self, title):
        
        for folder in self.configManager.allFolders:
            if folder.title == title:
                return folder
        return None
769661
def _get_title(self):
        """"""
        #TODO: unicode support
        strbuffer = self.ctypes.create_string_buffer(1024)
        size = self.ctypes.c_short(1024)
        #unicode versions are (Get|Set)ConsolTitleW
        self.ctypes.windll.kernel32.GetConsoleTitleA(strbuffer, size)
        return strbuffer.value
1356351
def _get_folder(gi, folder_name, library, libitems):
    
    for item in libitems:
        if item["type"] == "folder" and item["name"] == "/%s" % folder_name:
            return item
    return gi.libraries.create_folder(library.id, folder_name)[0]
133277
def folder_get_content(self, folder_key=None, content_type=None,
                           filter_=None, device_id=None, order_by=None,
                           order_direction=None, chunk=None, details=None,
                           chunk_size=None):
        
        return self.request('folder/get_content', QueryParams({
            'folder_key': folder_key,
            'content_type': content_type,
            'filter': filter_,
            'device_id': device_id,
            'order_by': order_by,
            'order_direction': order_direction,
            'chunk': chunk,
            'details': details,
            'chunk_size': chunk_size
        }))
710993
function _getFirstDirectory(dir) {
  var files = glob.sync(dir + '/*');

  for (var i = files.length; i--; ) {
    var file = files[i];
    if (fs.statSync(file).isDirectory()) return file;
  }

  return false;
}
953662
def titleOf(self, url):
        
        for m_url, m_title in self._stack:
            if url == m_url:
                return m_title
        
        return nativestring(url).split('/')[-1]
1134963
function getPath(filename, dir) {
  if (dir) {
    fs.ensureDirSync(dir);
    return filePath.join(dir, filename);
  } else {
    return filePath.join(__dirname, filename);
  }
}
1120648
def _get_section(self, name, create=True):
        """"""
        try:
            return self.sections[name]
        except KeyError:
            if not create:
                raise

            section = Section(name)
            self.sections[name] = section
            return section
629073
def folderitem(self, obj, item, index):
        
        url = item.get("url")
        title = item.get("Title")
        creator = obj.Creator()

        item["replace"]["Title"] = get_link(url, value=title)
        item["created"] = self.localize_date(obj.created())
        item["getType"] = _(obj.getType()[0])
        item["creator"] = ""
        if creator:
            props = api.get_user_properties(creator)
            name = props.get("fullname", creator)
            item["creator"] = name

        return item
970383
def getdir(self, section, option, raw=False, vars=None, fallback="", validate=False):
        
        v = self.get(section, option, raw=raw, vars=vars, fallback=fallback)
        v = self._convert_to_path(v)
        return v if not validate or os.path.isdir(v) else fallback
623944
def which(name):
    

    # we were given a filename, return it if it's executable
    if os.path.dirname(name) != '':
        if not os.path.isdir(name) and os.access(name, os.X_OK):
            return name
        else:
            return None

    # fetch PATH env var and split
    path_val = os.environ.get('PATH', None) or os.defpath

    # return the first match in the paths
    for path in path_val.split(os.pathsep):
        filename = os.path.join(path, name)

        if os.access(filename, os.X_OK):
            return filename

    return None
996656
function (title) {
                var document = window.document;
                if (ariaUtilsType.isString(title)) {
                    document.title = title;
                } else {
                    title = document.title;
                }
                return title;
            }
238165
def get_main_title(self, path_name, request_name):
        '''
        
        '''
        main_title = '.. http:{}:: {}'.format(request_name, path_name)
        self.write(main_title)
        self.write('')
422409
def section_by_title(
            self,
            title: str,
    ) -> Optional[WikipediaPageSection]:
        
        if not self._called['extracts']:
            self._fetch('extracts')
        return self._section_mapping.get(title)
130028
def get_title(desc, default=None):
    """"""
    if not desc:
        return default
    lines = desc.strip('\n').split('\n')
    if not lines:
        return default
    return lines[0].lstrip('# ').rstrip(' ')
730838
def get_path(self, dir=None):
        """"""
        if not dir:
            dir = self.fs.getcwd()
        if self == dir:
            return '.'
        path_elems = self.get_path_elements()
        pathname = ''
        try: i = path_elems.index(dir)
        except ValueError:
            for p in path_elems[:-1]:
                pathname += p.dirname
        else:
            for p in path_elems[i+1:-1]:
                pathname += p.dirname
        return pathname + path_elems[-1].name
1261375
public static List<String> getFilesInFolder(String folder, String ext) {
		// tryto find using normal file system lookup
		List<String> files = new Vector<>();
		File dir = new File(folder);
		if (dir.exists() && dir.isDirectory()) {
			String[] list = dir.list();
			for (String file : list) {
				if (file.endsWith(ext)) {
					files.add(file);
				}
			}
		}
		return files;
	}