Class DbxEntry.File

All Implemented Interfaces:
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:
  • Field Details

    • serialVersionUID

      public static final long serialVersionUID
      See Also:
    • numBytes

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

      public final 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 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 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).

    • rev

      public final String rev
      The revision of the file at this path. This can be used with DbxClientV1.uploadFile(java.lang.String, com.dropbox.core.v1.DbxWriteMode, long, java.io.InputStream) and the DbxWriteMode.update(java.lang.String) mode to make sure you're overwriting the revision of the file you think you're overwriting.
    • 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
    • videoInfo

      public final DbxEntry.File.VideoInfo videoInfo
      Contains details about this file if it is a video
    • Reader

      public static final JsonReader<DbxEntry.File> Reader
    • ReaderMaybeDeleted

      public static final JsonReader<DbxEntry.File> ReaderMaybeDeleted
  • Constructor Details

  • Method Details

    • dumpFields

      protected void dumpFields(DumpWriter w)
      Overrides:
      dumpFields in class DbxEntry
    • getTypeName

      protected 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(Object o)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(DbxEntry.File o)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object