Retrieves a directory.

    Returns:
      FakeDirectory: a directory or None if not available.
498629
def _GetDirectory(self):
    
    if self.entry_type != definitions.FILE_ENTRY_TYPE_DIRECTORY:
      return None
    return FakeDirectory(self._file_system, self.path_spec)
1008454
String getJsDirectory(Map<String, String> options) {
		if (null != options) {
			if (options.containsKey(ProcessorConstants.DIRECTORY)) {
				return options.get(ProcessorConstants.DIRECTORY);
			}
		}
		return null;
	}
7004
def dir_exists(self):
        

        r = requests.request(self.method if self.method else 'HEAD', self.url, **self.storage_args)
        try: r.raise_for_status()
        except Exception: return False

        return True
480315
def directory(cls, prefix=None):
        
        prefix = prefix or utility.read_config().directory
        name = cls.__name__.lower()
        directory = os.path.expanduser(os.path.join(prefix, name))
        utility.ensure_directory(directory)
        return directory
257629
function getDirectoryFromBowerRc(cwd) {
    var bowerrc = path.join(cwd, '.bowerrc');

    if (!fs.existsSync(bowerrc)) {
        return '';
    }

    var bower_config = {};
    try {
        bower_config = JSON.parse(fs.readFileSync(bowerrc));
    } catch (err) {
        return '';
    }

    return bower_config.directory;
}
900424
def dir():
        
        dir = [
            'abspath', 'dirname', 'exists', 'expanduser', 'getatime',
            'getctime', 'getmtime', 'getsize', 'isabs', 'isdir', 'isfile',
            'islink', 'ismount', 'join', 'lexists', 'normcase', 'normpath',
            'realpath', 'relpath', 'split', 'splitdrive'
        ]
        if IS_PY2:
            dir.append('walk')
        if sys.platform != 'win32' or not IS_PY2:
            dir.append('samefile')
        return dir
663424
def get_system_root_directory():
    
    root = os.path.dirname(__file__)
    root = os.path.dirname(root)
    root = os.path.abspath(root)
    return root
964473
def get_folder(self, title):
        
        for folder in self.configManager.allFolders:
            if folder.title == title:
                return folder
        return None
362679
def get_file(self,
                 path,
                 dest='',
                 makedirs=False,
                 saltenv='base',
                 gzip=None,
                 cachedir=None):
        '''
        
        '''
        raise NotImplementedError
1260486
def _GetDirectory(self):
    
    if self.entry_type != definitions.FILE_ENTRY_TYPE_DIRECTORY:
      return None
    return TSKPartitionDirectory(self._file_system, self.path_spec)
1245612
def _get_directory_path(context):
    """"""
    path = os.path.join(settings.BASE_PATH, 'store')
    path = context.params.get('path', path)
    path = os.path.join(path, context.crawler.name)
    path = os.path.abspath(os.path.expandvars(path))
    try:
        os.makedirs(path)
    except Exception:
        pass
    return path
913834
def _valid_directory(self, path):
        
        abspath = os.path.abspath(path)
        if not os.path.isdir(abspath):
            raise argparse.ArgumentTypeError('Not a valid directory: {}'.format(abspath))
        return abspath
427914
def working_directory(self):
        
        _complain_ifclosed(self.closed)
        wd = self.fs.get_working_directory()
        return wd
1350578
def IsDir(v):
    
    try:
        if v:
            v = str(v)
            return os.path.isdir(v)
        else:
            raise DirInvalid("Not a directory")
    except TypeError:
        raise DirInvalid("Not a directory")
785400
def isdir(path):
    
    system = get_instance(path)

    # User may use directory path without trailing '/'
    # like on standard file systems
    return system.isdir(system.ensure_dir_path(path))
1201994
def getexistingdirectory(parent=None, caption='', basedir='',
                         options=QFileDialog.ShowDirsOnly):
    """"""
    # Calling QFileDialog static method
    if sys.platform == "win32":
        # On Windows platforms: redirect standard outputs
        _temp1, _temp2 = sys.stdout, sys.stderr
        sys.stdout, sys.stderr = None, None
    try:
        result = QFileDialog.getExistingDirectory(parent, caption, basedir,
                                                  options)
    finally:
        if sys.platform == "win32":
            # On Windows platforms: restore standard outputs
            sys.stdout, sys.stderr = _temp1, _temp2
    if not is_text_string(result):
        # PyQt API #1
        result = to_text_string(result)
    return result
176252
def _GetDirectory(self):
    
    if self._fsapfs_file_entry.number_of_sub_file_entries <= 0:
      return None

    return APFSDirectory(self._file_system, self.path_spec)