Class UfsFileStatus

    • Field Detail

      • INVALID_CONTENT_HASH

        public static final java.lang.String INVALID_CONTENT_HASH
        See Also:
        Constant Field Values
      • mContentHash

        protected final java.lang.String mContentHash
      • mContentLength

        protected final long mContentLength
      • mBlockSize

        protected final long mBlockSize
    • Constructor Detail

      • UfsFileStatus

        public UfsFileStatus​(java.lang.String name,
                             java.lang.String contentHash,
                             long contentLength,
                             @Nullable
                             java.lang.Long lastModifiedTimeMs,
                             java.lang.String owner,
                             java.lang.String group,
                             short mode,
                             @Nullable
                             java.util.Map<java.lang.String,​byte[]> xAttr,
                             long blockSize)
        Creates new instance of UfsFileStatus.
        Parameters:
        name - relative path of file
        contentHash - hash of the file contents
        contentLength - in bytes
        lastModifiedTimeMs - UTC time
        owner - of the file
        group - of the file
        mode - of the file
        xAttr - extended attributes, if any
        blockSize - blocksize, -1 if unknown
      • UfsFileStatus

        public UfsFileStatus​(java.lang.String name,
                             java.lang.String contentHash,
                             long contentLength,
                             @Nullable
                             java.lang.Long lastModifiedTimeMs,
                             java.lang.String owner,
                             java.lang.String group,
                             short mode,
                             long blockSize)
        Creates new instance of UfsFileStatus without any extended attributes.
        Parameters:
        name - relative path of file
        contentHash - hash of the file contents
        contentLength - in bytes
        lastModifiedTimeMs - UTC time
        owner - of the file
        group - of the file
        mode - of the file
        blockSize - blocksize, -1 if unknown
      • UfsFileStatus

        @Deprecated
        public UfsFileStatus​(java.lang.String name,
                             java.lang.String contentHash,
                             long contentLength,
                             @Nullable
                             java.lang.Long lastModifiedTimeMs,
                             java.lang.String owner,
                             java.lang.String group,
                             short mode,
                             @Nullable
                             java.util.Map<java.lang.String,​byte[]> xAttr)
        Deprecated.
        as of 2.1.0, use #UfsFileStatus(String, String, long, long, String, String, short, Map, long)
        Creates new instance of UfsFileStatus.
        Parameters:
        name - relative path of file
        contentHash - hash of the file contents
        contentLength - in bytes
        lastModifiedTimeMs - UTC time
        owner - of the file
        group - of the file
        mode - of the file
        xAttr - extended attributes, if any
      • UfsFileStatus

        @Deprecated
        public UfsFileStatus​(java.lang.String name,
                             java.lang.String contentHash,
                             long contentLength,
                             @Nullable
                             java.lang.Long lastModifiedTimeMs,
                             java.lang.String owner,
                             java.lang.String group,
                             short mode)
        Deprecated.
        as of 2.1.0, use #UfsFileStatus(String, String, long, long, String, String, short, long).
        Creates a new instance of UfsFileStatus without any extended attributes.
        Parameters:
        name - relative path of file
        contentHash - hash of the file contents
        contentLength - in bytes
        lastModifiedTimeMs - UTC time
        owner - of the file
        group - of the file
        mode - of the file
      • UfsFileStatus

        public UfsFileStatus​(UfsFileStatus status)
        Creates a new instance of UfsFileStatus as a copy.
        Parameters:
        status - file information to copy
    • Method Detail

      • getContentHash

        public java.lang.String getContentHash()
        Returns:
        the hash of the file contents
      • getContentLength

        public long getContentLength()
        Get the content size in bytes.
        Returns:
        file size in bytes
      • getBlockSize

        public long getBlockSize()
        Returns:
        the block size in bytes, -1 if unknown
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object