public static final class DbxEntry.File extends DbxEntry
DbxEntry
used to represent file metadata (as opposed
to folder metadata).Modifier and Type | Class and Description |
---|---|
static class |
DbxEntry.File.Location
A geo location
|
static class |
DbxEntry.File.PhotoInfo
Photo metadata that the Dropbox server extracted from the photo file.
|
static class |
DbxEntry.File.VideoInfo
Video metadata that the Dropbox server extracted from the video file.
|
DbxEntry.File, DbxEntry.Folder, DbxEntry.WithChildren, DbxEntry.WithChildrenC<C>
Modifier and Type | Field and Description |
---|---|
java.util.Date |
clientMtime
The modification time sent up by the Dropbox desktop client when the file was added
or modified.
|
java.lang.String |
humanSize
A human-readable string version of the file size (ex: "13 kb").
|
java.util.Date |
lastModified
The time the file was added, moved, or last had it's contents changed on the Dropbox
server.
|
long |
numBytes
The size, in bytes, of the file content.
|
DbxEntry.File.PhotoInfo |
photoInfo
If this file is a photo, this may contain additional photo-related information.
|
static JsonReader<DbxEntry.File> |
Reader |
static JsonReader<DbxEntry.File> |
ReaderMaybeDeleted |
java.lang.String |
rev
The revision of the file at this path.
|
static long |
serialVersionUID |
DbxEntry.File.VideoInfo |
videoInfo
Contains details about this file if it is a video
|
iconName, mightHaveThumbnail, name, path
Constructor and Description |
---|
File(java.lang.String path,
java.lang.String iconName,
boolean mightHaveThumbnail,
long numBytes,
java.lang.String humanSize,
java.util.Date lastModified,
java.util.Date clientMtime,
java.lang.String rev)
|
File(java.lang.String path,
java.lang.String iconName,
boolean mightHaveThumbnail,
long numBytes,
java.lang.String humanSize,
java.util.Date lastModified,
java.util.Date clientMtime,
java.lang.String rev,
DbxEntry.File.PhotoInfo photoInfo,
DbxEntry.File.VideoInfo videoInfo) |
Modifier and Type | Method and Description |
---|---|
DbxEntry.File |
asFile()
If this metadata entry is a file, return it as a
DbxEntry.File
instance. |
DbxEntry.Folder |
asFolder()
If this metadata entry is a folder, return it as a
DbxEntry.Folder
instance. |
protected void |
dumpFields(DumpWriter w) |
boolean |
equals(DbxEntry.File o) |
boolean |
equals(java.lang.Object o) |
protected java.lang.String |
getTypeName() |
int |
hashCode() |
boolean |
isFile()
Whether this metadata is for a file, which can be cast to type
DbxEntry.File . |
boolean |
isFolder()
Whether this metadata is for a folder, which can be cast to type
DbxEntry.Folder . |
partialEquals, partialHashCode, read, readMaybeDeleted
toString, toString, toStringMultiline, toStringMultiline
public static final long serialVersionUID
public final long numBytes
public final java.lang.String humanSize
Locale
in DbxRequestConfig.userLocale
(passed in to the DbxClientV1
constructor).public final java.util.Date lastModified
clientMtime
is a better estimate.)public final java.util.Date clientMtime
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).
public final java.lang.String rev
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.public final DbxEntry.File.PhotoInfo photoInfo
includeMediaInfo
public final DbxEntry.File.VideoInfo videoInfo
public static final JsonReader<DbxEntry.File> Reader
public static final JsonReader<DbxEntry.File> ReaderMaybeDeleted
public File(java.lang.String path, java.lang.String iconName, boolean mightHaveThumbnail, long numBytes, java.lang.String humanSize, java.util.Date lastModified, java.util.Date clientMtime, java.lang.String rev, DbxEntry.File.PhotoInfo photoInfo, DbxEntry.File.VideoInfo videoInfo)
path
- DbxEntry.path
iconName
- DbxEntry.iconName
mightHaveThumbnail
- DbxEntry.mightHaveThumbnail
numBytes
- numBytes
humanSize
- humanSize
lastModified
- lastModified
clientMtime
- clientMtime
rev
- rev
photoInfo
- photoInfo
videoInfo
- videoInfo
public File(java.lang.String path, java.lang.String iconName, boolean mightHaveThumbnail, long numBytes, java.lang.String humanSize, java.util.Date lastModified, java.util.Date clientMtime, java.lang.String rev)
protected void dumpFields(DumpWriter w)
dumpFields
in class DbxEntry
protected java.lang.String getTypeName()
getTypeName
in class Dumpable
public boolean isFolder()
DbxEntry
DbxEntry.Folder
. (Every metadata object is either for a file or a folder.)public boolean isFile()
DbxEntry
DbxEntry.File
. (Every metadata object is either for a file or a folder.)public DbxEntry.Folder asFolder()
DbxEntry
DbxEntry.Folder
instance. If it's not a folder, return null
.public DbxEntry.File asFile()
DbxEntry
DbxEntry.File
instance. If it's not a file, return null
.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(DbxEntry.File o)
public int hashCode()
hashCode
in class java.lang.Object