public static final class DbxEntry.File extends DbxEntry
DbxEntry
used to represent file metadata (as opposed
to folder metadata).DbxEntry.File, DbxEntry.Folder, DbxEntry.WithChildren, DbxEntry.WithChildrenC<C>
Modifier and Type | Field and Description |
---|---|
Date |
clientMtime
The modification time sent up by the Dropbox desktop client when the file was added
or modified.
|
String |
humanSize
A human-readable string version of the file size (ex: "13 kb").
|
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.
|
static JsonReader<DbxEntry.File> |
Reader |
static JsonReader<DbxEntry.File> |
ReaderMaybeDeleted |
String |
rev
The revision of the file at this path.
|
static long |
serialVersionUID |
iconName, mightHaveThumbnail, name, path
Constructor and Description |
---|
DbxEntry.File(String path,
String iconName,
boolean mightHaveThumbnail,
long numBytes,
String humanSize,
Date lastModified,
Date clientMtime,
String rev) |
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(Object o) |
protected 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 String humanSize
Locale
in DbxRequestConfig.userLocale
(passed in to the DbxClient
constructor).public final Date lastModified
clientMtime
is a better estimate.)public final 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 String rev
DbxClient.uploadFile(java.lang.String, com.dropbox.core.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 static final JsonReader<DbxEntry.File> Reader
public static final JsonReader<DbxEntry.File> ReaderMaybeDeleted
public DbxEntry.File(String path, String iconName, boolean mightHaveThumbnail, long numBytes, String humanSize, Date lastModified, Date clientMtime, String rev)
path
- DbxEntry.path
iconName
- DbxEntry.iconName
mightHaveThumbnail
- DbxEntry.mightHaveThumbnail
numBytes
- numBytes
humanSize
- humanSize
lastModified
- lastModified
clientMtime
- clientMtime
rev
- rev
protected void dumpFields(DumpWriter w)
dumpFields
in class DbxEntry
protected 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(DbxEntry.File o)
Copyright © 2014. All rights reserved.