Get an iterator of JFSFolder() from the given mountPoint.

        "mountPoint" may be either an actual mountPoint element from JFSDevice.mountPoints{} or its .name.
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 []]
59975
public static Iterator iterator(Object list)
    {
        if (list==null)
            return Collections.EMPTY_LIST.iterator();
        if (list instanceof List)
            return ((List)list).iterator();
        return getList(list).iterator();
    }
913854
private static Iterator<String> getPidIterator(ValidatorProcessParameters parms,
                                                   RemoteObjectSource objectSource)
            throws ObjectSourceException {
        if (parms.getIteratorType() == IteratorType.FS_QUERY) {
            return objectSource.findObjectPids(parms.getQuery());
        } else {
            return new PidfileIterator(parms.getPidfile());
        }
    }
58703
DistributedFileSystem getDFS() throws IOException {
    if (this.dfs == null) {
      FileSystem fs = location.getDFS();
      if (!(fs instanceof DistributedFileSystem)) {
        ErrorMessageDialog.display("DFS Browser",
            "The DFS Browser cannot browse anything else "
                + "but a Distributed File System!");
        throw new IOException("DFS Browser expects a DistributedFileSystem!");
      }
      this.dfs = (DistributedFileSystem) fs;
    }
    return this.dfs;
  }
1272895
public alluxio.grpc.MountPointInfo getMountPointsOrDefault(
      java.lang.String key,
      alluxio.grpc.MountPointInfo defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, alluxio.grpc.MountPointInfo> map =
        internalGetMountPoints().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
1102363
public static File getMountSource(Closeable handle) {
        if (handle instanceof MountHandle) { return MountHandle.class.cast(handle).getMountSource(); }
        return null;
    }
904454
private Iterable<URL> createServiceFileIterator() {
        if (classLoader == null) {
            ClassLoader classLoader = SchemaFactoryFinder.class.getClassLoader();
            return Collections.singleton(classLoader.getResource(SERVICE_ID));
        } else {
            try {
                Enumeration<URL> e = classLoader.getResources(SERVICE_ID);
                if (debug && !e.hasMoreElements()) {
                    debugPrintln("no "+SERVICE_ID+" file was found");
                }

                // wrap it into an Iterator.
                return Collections.list(e);
            } catch (IOException e) {
                if (debug) {
                    debugPrintln("failed to enumerate resources "+SERVICE_ID);
                    e.printStackTrace();
                }
                return Collections.emptySet();
            }
        }
    }
971406
protected static String getInstancesFolder(FileSystem fS, Configuration conf) throws IOException {
    return conf.get(HDFS_TMP_FOLDER_CONF, fS.equals(FileSystem.getLocal(conf)) ? DEFAULT_LOCAL_TMP_FOLDER_CONF_VALUE
        : DEFAULT_HDFS_TMP_FOLDER_CONF_VALUE);
  }
1233902
def getDeviceIterator(self, skip_on_error=False):
        
        device_p_p = libusb1.libusb_device_p_p()
        libusb_device_p = libusb1.libusb_device_p
        device_list_len = libusb1.libusb_get_device_list(self.__context_p,
                                                         byref(device_p_p))
        mayRaiseUSBError(device_list_len)
        try:
            for device_p in device_p_p[:device_list_len]:
                try:
                    # Instanciate our own libusb_device_p object so we can free
                    # libusb-provided device list. Is this a bug in ctypes that
                    # it doesn't copy pointer value (=pointed memory address) ?
                    # At least, it's not so convenient and forces using such
                    # weird code.
                    device = USBDevice(self, libusb_device_p(device_p.contents))
                except USBError:
                    if not skip_on_error:
                        raise
                else:
                    self.__close_set.add(device)
                    yield device
        finally:
            libusb1.libusb_free_device_list(device_p_p, 1)
175133
def GetRawDevice(path):
  """"""
  device_map = GetMountpoints()

  path = utils.SmartUnicode(path)
  mount_point = path = utils.NormalizePath(path, "/")

  result = rdf_paths.PathSpec(pathtype=rdf_paths.PathSpec.PathType.OS)

  # Assign the most specific mount point to the result
  while mount_point:
    try:
      result.path, fs_type = device_map[mount_point]
      if fs_type in [
          "ext2", "ext3", "ext4", "vfat", "ntfs", "Apple_HFS", "hfs", "msdos"
      ]:
        # These are read filesystems
        result.pathtype = rdf_paths.PathSpec.PathType.OS
      else:
        result.pathtype = rdf_paths.PathSpec.PathType.UNSET

      # Drop the mount point
      path = utils.NormalizePath(path[len(mount_point):])

      return result, path
    except KeyError:
      mount_point = os.path.dirname(mount_point)
604034
def getCheckpointFile(self):
        
        checkpointFile = self._jrdd.rdd().getCheckpointFile()
        if checkpointFile.isDefined():
            return checkpointFile.get()
580888
def get_dev_at_mountpoint(mntpoint):
        
        results = util.subp(['findmnt', '-o', 'SOURCE', mntpoint])
        if results.return_code != 0:
            raise MountError('No device mounted at %s' % mntpoint)

        stdout = results.stdout.decode(sys.getdefaultencoding())
        return stdout.replace('SOURCE\n', '').strip().split('\n')[-1]
195445
public List<String> getChildNames(VirtualFile mountPoint, VirtualFile target) {
        List<String> names = new LinkedList<String>();
        AssemblyNode targetNode = null;
        if (mountPoint.equals(target)) {
            targetNode = rootNode;
        } else {
            targetNode = rootNode.find(target.getPathNameRelativeTo(mountPoint));
        }
        if (targetNode != null) {
            for (AssemblyNode childNode : targetNode.children.values()) {
                names.add(childNode.realName);
            }
        }
        return names;
    }
1008454
String getJsDirectory(Map<String, String> options) {
		if (null != options) {
			if (options.containsKey(ProcessorConstants.DIRECTORY)) {
				return options.get(ProcessorConstants.DIRECTORY);
			}
		}
		return null;
	}
1008024
public Iterator<StashTableMetadata> listTableMetadata() {
        final String root = getRootPath();
        final String prefix = String.format("%s/", root);
        final int prefixLength = prefix.length();

        return new AbstractIterator<StashTableMetadata>() {
            PeekingIterator<S3ObjectSummary> _listResponse =
                    Iterators.peekingIterator(Iterators.<S3ObjectSummary>emptyIterator());
            String _marker = null;
            boolean _truncated = true;

            @Override
            protected StashTableMetadata computeNext() {
                String tableDir = null;
                List<StashFileMetadata> files = Lists.newArrayListWithCapacity(16);
                boolean allFilesRead = false;

                while (!allFilesRead) {
                    if (_listResponse.hasNext()) {
                        // Peek at the next record but don't consume it until we verify it's part of the same table
                        S3ObjectSummary s3File = _listResponse.peek();
                        String key = s3File.getKey();

                        // Don't include the _SUCCESS file or any other stray files we may find
                        String[] parentDirAndFile = key.substring(prefixLength).split("/");
                        if (parentDirAndFile.length != 2) {
                            // Consume and skip this row
                            _listResponse.next();
                        } else {
                            String parentDir = parentDirAndFile[0];
                            if (tableDir == null) {
                                tableDir = parentDir;
                            }

                            if (!parentDir.equals(tableDir)) {
                                allFilesRead = true;
                            } else {
                                // Record is part of this table; consume it now
                                _listResponse.next();
                                files.add(new StashFileMetadata(_bucket, key, s3File.getSize()));
                            }
                        }
                    } else if (_truncated) {
                        ObjectListing response = _s3.listObjects(new ListObjectsRequest()
                                .withBucketName(_bucket)
                                .withPrefix(prefix)
                                .withMarker(_marker)
                                .withMaxKeys(1000));

                        _listResponse = Iterators.peekingIterator(response.getObjectSummaries().iterator());
                        _marker = response.getNextMarker();
                        _truncated = response.isTruncated();
                    } else {
                        allFilesRead = true;
                    }
                }

                if (tableDir == null) {
                    // No files read this iteration means all files have been read
                    return endOfData();
                }

                String tablePrefix = prefix + tableDir + "/";
                String tableName = StashUtil.decodeStashTable(tableDir);
                return new StashTableMetadata(_bucket, tablePrefix, tableName, files);
            }
        };
    }
1075539
public int getNumberOfFiles() throws IOException {
      DistributedFileSystem dfs = (DistributedFileSystem)fs;
      RemoteIterator<LocatedFileStatus> iter = dfs.listLocatedStatus(outputPath);
      int fn = 0;
      while (iter.hasNext()) {
        LocatedFileStatus lfs = iter.next();
        if (lfs.isDir()) 
          continue;
        if (lfs.getBlockLocations().length != 1) 
          continue;
        String curHost = rtc.cur_datanode;
        for (String host: lfs.getBlockLocations()[0].getHosts()) {
          if (curHost.equals(host)){
            fn++;
            break;
          }
        }
      }
      LOG.info(" Found " + fn + " files in " + dfs.getUri());
      return fn;
    }
246724
public java.util.Map<java.lang.String, alluxio.grpc.MountPointInfo> getMountPointsMap() {
    return internalGetMountPoints().getMap();
  }