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.
|
String |
mimeType |
long |
numBytes
The size, in bytes, of the file content.
|
String |
revision
The revision of the file at this path.
|
static long |
serialVersionUID |
| Constructor and Description |
|---|
DbxEntry.File(String path,
String iconName,
boolean mightHaveThumbnail,
long numBytes,
String humanSize,
Date lastModified,
Date clientMtime,
String mimeType,
String revision) |
| 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) |
protected String |
getTypeName() |
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. |
String |
toString()
A abbreviated version of
DbxDataObject.toStringMultiline(). |
dump, dump, dump, dump, dump, toStringDate, toStringMultiline, toStringMultilinepublic 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 mimeType
public final String revision
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 DbxEntry.File(String path, String iconName, boolean mightHaveThumbnail, long numBytes, String humanSize, Date lastModified, Date clientMtime, String mimeType, String revision)
path - DbxEntry.pathiconName - DbxEntry.iconNamemightHaveThumbnail - DbxEntry.mightHaveThumbnailnumBytes - numByteshumanSize - humanSizelastModified - lastModifiedclientMtime - clientMtimemimeType - mimeTyperevision - revisionprotected void dumpFields(DumpWriter w)
dumpFields in class DbxEntryprotected String getTypeName()
getTypeName in class DbxDataObjectpublic String toString()
DbxDataObject.toStringMultiline(). Only includes the path.public boolean isFolder()
DbxEntryDbxEntry.Folder. (Every metadata object is either for a file or a folder.)public boolean isFile()
DbxEntryDbxEntry.File. (Every metadata object is either for a file or a folder.)public DbxEntry.Folder asFolder()
DbxEntryDbxEntry.Folder
instance. If it's not a folder, return null.public DbxEntry.File asFile()
DbxEntryDbxEntry.File
instance. If it's not a file, return null.Copyright © 2013. All rights reserved.