Lists all the directories contents in this hostname/process' namespace.
@return -1 on error, 0 on success
487450
private static int listDFSPaths()
  {
    Date alpha = new Date();
    int inodeCount = 0;

    String basePath = new String(TEST_BASE_DIR) + "/" + hostName_ + "_" + processName_;
    Queue<String> pending = new LinkedList<String>();
    pending.add(basePath);

    while (!pending.isEmpty()) {
      String parent = pending.remove();
      try {
      	
	  		long startTime = System.nanoTime();
        FileStatus[] children = dfsClient_.listPaths(parent);
        timingListPaths_.add(new Double((System.nanoTime() - startTime)/(1E9)));

        if (children == null || children.length == 0) {
          continue;
        }
        
        for (int i = 0; i < children.length; i++) {
        	String localName = children[i].getPath().getName();
        	if (localName.equals(".") || localName.equals("..")) {
        		continue;
        	}
        	inodeCount ++;
        	if (inodeCount % COUNT_INCR == 0) {
        		System.out.printf("Readdir paths so far: %d\n", inodeCount);
        	}
        	if (children[i].isDir()) {
        		pending.add(parent + "/" + localName);
        	} else {
        		files_.put(parent + "/" + localName, null);
        	}
        }
      } catch (IOException e) {
        e.printStackTrace();
        return -1;
      }
    }

    Date zigma = new Date();
    System.out.printf("Client: Directory walk done over %d inodes in %d msec\n",
    		inodeCount, timeDiffMilliSec(alpha, zigma));
    return 0;
  }
630444
def DirectoriesRelative(self):
        
        # Acquire all directories
        directories = itertools.chain(self.Directories, (os.path.dirname(f) for f in itertools.chain(self.ContentFiles, self.CompileFiles)))
        directories = set(os.path.relpath(d, self.ProjectHome) for d in directories)

        # We need separate entries for parent directories of directories in the list
        for path in set(directories):
            subpath = os.path.dirname(path)
            while subpath:
                directories.add(subpath)
                subpath = os.path.dirname(subpath)

        return sorted(directories)
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)
939893
def listdir(self, path='.'):
        
        self._connect()

        if self.sftp:
            contents = self._sftp_listdir(path)
        else:
            contents = self._ftp_listdir(path)

        self._close()

        return contents
809334
def dirpaths(self):
        
        parts = self.parts()
        result = [DotPath(parts[0] or '/')]
        for name in parts[1:]:
            result.append(result[-1] / name)
        return result
1225659
def list_all():
    '''
    
    '''
    ret = []
    if _sd_version() >= 219:
        for line in _machinectl('list-images')['stdout'].splitlines():
            try:
                ret.append(line.split()[0])
            except IndexError:
                continue
    else:
        rootdir = _root()
        try:
            for dirname in os.listdir(rootdir):
                if os.path.isdir(os.path.join(rootdir, dirname)):
                    ret.append(dirname)
        except OSError:
            pass
    return ret
293545
def rpc_get_all_namespaces( self, **con_info ):
        
        db = get_db_state(self.working_dir)
        all_namespaces = db.get_all_namespace_ids()
        db.close()

        return self.success_response( {'namespaces': all_namespaces} )
946855
def list_directory2(self, mdir, limit=None, marker=None):
        
        log.debug('ListDirectory %r', mdir)

        query = {}
        if limit:
            query["limit"] = limit
        if marker:
            query["marker"] = marker

        res, content = self._request(mdir, "GET", query=query)
        if res["status"] != "200":
            raise errors.MantaAPIError(res, content)
        lines = content.splitlines(False)
        dirents = []
        for line in lines:
            if not line.strip():
                continue
            try:
                dirents.append(json.loads(line.decode("utf-8")))
            except ValueError:
                raise errors.MantaError('invalid directory entry: %r' % line)
        return res, dirents
503957
def folders(self, mountPoint):
        
        if isinstance(mountPoint, six.string_types):
            # shortcut: pass a mountpoint name
            mountPoint = self.mountPoints[mountPoint]
        try:
            return [JFSFolder(f, self, parentpath='%s/%s' % (self.path, mountPoint.name)) for f in self.contents(mountPoint).folders.iterchildren()]
        except AttributeError as err:
            # no files at all
            return [x for x in []]
315478
def get_distribution_names(self):
        
        result = set()
        for root, dirs, files in os.walk(self.base_dir):
            for fn in files:
                if self.should_include(fn, root):
                    fn = os.path.join(root, fn)
                    url = urlunparse(('file', '',
                                      pathname2url(os.path.abspath(fn)),
                                      '', '', ''))
                    info = self.convert_url_to_download_info(url, None)
                    if info:
                        result.add(info['name'])
            if not self.recursive:
                break
        return result
38339
public java.util.List<WorkspaceDirectory> getDirectories() {
        if (directories == null) {
            directories = new com.amazonaws.internal.SdkInternalList<WorkspaceDirectory>();
        }
        return directories;
    }
940254
def get_all():
    '''
    
    '''
    if not SERVICE_DIR:
        raise CommandExecutionError("Could not find service directory.")
    service_list = [dirname for dirname
                            in os.listdir(SERVICE_DIR)
                            if not dirname.startswith('.')]
    return sorted(service_list)
193866
public static List<String> getDirectoryNames(String root, boolean fullPath) {
        List<File> fileList = getDirectoriesByName(root);
        List<String> list = new ArrayList<String>(fileList.size());

        for (File f : fileList) {
            String name = fullPath ? f.getAbsolutePath() : f.getName();
            list.add(name);
        }

        return list;
    }
232023
private static DirContext getDirContext() {
        Hashtable<String, String> env = new Hashtable<>();
        env.put(JAVA_NAMING_FACTORY_INITIAL, DNS_NAMING_FACTORY);
        env.put(JAVA_NAMING_PROVIDER_URL, DNS_PROVIDER_URL);

        try {
            return new InitialDirContext(env);
        } catch (Throwable e) {
            throw new RuntimeException("Cannot get dir context for some reason", e);
        }
    }
745169
def dirs(self):
        """"""
        contents = self.paths
        contents = (BinDir(path.path) for path in contents if path.is_dir)
        return contents
1270004
def listdir(path='.'):
    
    return [name.rstrip('/') for name, _ in
            get_instance(path).list_objects(path, first_level=True)]
656202
def list_directory(self, *args, **kwargs):
		
		return tuple(self.dav_client().list(self.session_path()))