DirectoryListing (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.protocol, class: DirectoryListing

Package org.apache.hadoop.hdfs.protocol

# Class DirectoryListing

java.lang.Object
org.apache.hadoop.hdfs.protocol.DirectoryListing

@Private @Evolving public class DirectoryListing extends Object
This class defines a partial listing of a directory to support iterative directory listing.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DirectoryListing(HdfsFileStatus[] partialListing, int remainingEntries)`
  constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `getLastName()`
  Get the last name in this list
  `HdfsFileStatus[]`
  `getPartialListing()`
  Get the partial listing of file status
  `int`
  `getRemainingEntries()`
  Get the number of remaining entries that are left to be listed
  `boolean`
  `hasMore()`
  Check if there are more entries that are left to be listed

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DirectoryListing

    public DirectoryListing(HdfsFileStatus[] partialListing, int remainingEntries)
    constructor
    Parameters:
      `partialListing` - a partial listing of a directory
      `remainingEntries` - number of entries that are left to be listed

- ## Method Details

  - ### getPartialListing

    public HdfsFileStatus[] getPartialListing()
    Get the partial listing of file status
    Returns:
      the partial listing of file status

  - ### getRemainingEntries

    public int getRemainingEntries()
    Get the number of remaining entries that are left to be listed
    Returns:
      the number of remaining entries that are left to be listed

  - ### hasMore

    public boolean hasMore()
    Check if there are more entries that are left to be listed
    Returns:
      true if there are more entries that are left to be listed; return false otherwise.

  - ### getLastName

    public byte[] getLastName()
    Get the last name in this list
    Returns:
      the last name in the list if it is not empty; otherwise return null