Class DbxEntry.File

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    DbxEntry

    public static final class DbxEntry.File
    extends DbxEntry
    The subclass of DbxEntry used to represent file metadata (as opposed to folder metadata).
    See Also:
    Serialized Form
    • Field Detail

      • numBytes

        public final long numBytes
        The size, in bytes, of the file content.
      • humanSize

        public final java.lang.String humanSize
        A human-readable string version of the file size (ex: "13 kb"). This string will be localized based on the Locale in DbxRequestConfig.userLocale (passed in to the DbxClientV1 constructor).
      • lastModified

        public final java.util.Date lastModified
        The time the file was added, moved, or last had it's contents changed on the Dropbox server. (This probably won't match the time on the Dropbox user's filesystem. For that the clientMtime is a better estimate.)
      • clientMtime

        public final java.util.Date clientMtime
        The modification time sent up by the Dropbox desktop client when the file was added or modified. This time is based on the system clock of the particular host that the client was running on, as opposed to the system clock of the Dropbox servers.

        This field should not be used to determine if a file has changed, but only as a way to sort files by date (when displaying a list of files to the user).

      • photoInfo

        public final DbxEntry.File.PhotoInfo photoInfo
        If this file is a photo, this may contain additional photo-related information. This field is only populated if you use the includeMediaInfo
    • Method Detail

      • getTypeName

        protected java.lang.String getTypeName()
        Overrides:
        getTypeName in class Dumpable
      • isFolder

        public boolean isFolder()
        Description copied from class: DbxEntry
        Whether this metadata is for a folder, which can be cast to type DbxEntry.Folder. (Every metadata object is either for a file or a folder.)
        Specified by:
        isFolder in class DbxEntry
      • isFile

        public boolean isFile()
        Description copied from class: DbxEntry
        Whether this metadata is for a file, which can be cast to type DbxEntry.File. (Every metadata object is either for a file or a folder.)
        Specified by:
        isFile in class DbxEntry
      • asFolder

        public DbxEntry.Folder asFolder()
        Description copied from class: DbxEntry
        If this metadata entry is a folder, return it as a DbxEntry.Folder instance. If it's not a folder, return null.
        Specified by:
        asFolder in class DbxEntry
      • asFile

        public DbxEntry.File asFile()
        Description copied from class: DbxEntry
        If this metadata entry is a file, return it as a DbxEntry.File instance. If it's not a file, return null.
        Specified by:
        asFile in class DbxEntry
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object