Package com.dropbox.core.v1
Class DbxEntry.File
java.lang.Object
com.dropbox.core.util.Dumpable
com.dropbox.core.v1.DbxEntry
com.dropbox.core.v1.DbxEntry.File
- All Implemented Interfaces:
Serializable
- Enclosing class:
DbxEntry
The subclass of
DbxEntry used to represent file metadata (as opposed
to folder metadata).- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA geo locationstatic final classPhoto metadata that the Dropbox server extracted from the photo file.static final classVideo metadata that the Dropbox server extracted from the video file.Nested classes/interfaces inherited from class com.dropbox.core.v1.DbxEntry
DbxEntry.File, DbxEntry.Folder, DbxEntry.WithChildren, DbxEntry.WithChildrenC<C> -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal DateThe modification time sent up by the Dropbox desktop client when the file was added or modified.final StringA human-readable string version of the file size (ex: "13 kb").final DateThe time the file was added, moved, or last had it's contents changed on the Dropbox server.final longThe size, in bytes, of the file content.final DbxEntry.File.PhotoInfoIf this file is a photo, this may contain additional photo-related information.static final JsonReader<DbxEntry.File> static final JsonReader<DbxEntry.File> final StringThe revision of the file at this path.static final longfinal DbxEntry.File.VideoInfoContains details about this file if it is a videoFields inherited from class com.dropbox.core.v1.DbxEntry
iconName, mightHaveThumbnail, name, path -
Constructor Summary
ConstructorsConstructorDescriptionFile(String path, String iconName, boolean mightHaveThumbnail, long numBytes, String humanSize, Date lastModified, Date clientMtime, String rev) File(String path, String iconName, boolean mightHaveThumbnail, long numBytes, String humanSize, Date lastModified, Date clientMtime, String rev, DbxEntry.File.PhotoInfo photoInfo, DbxEntry.File.VideoInfo videoInfo) -
Method Summary
Modifier and TypeMethodDescriptionasFile()If this metadata entry is a file, return it as aDbxEntry.Fileinstance.asFolder()If this metadata entry is a folder, return it as aDbxEntry.Folderinstance.protected voidbooleanbooleanprotected StringinthashCode()booleanisFile()Whether this metadata is for a file, which can be cast to typeDbxEntry.File.booleanisFolder()Whether this metadata is for a folder, which can be cast to typeDbxEntry.Folder.Methods inherited from class com.dropbox.core.v1.DbxEntry
partialEquals, partialHashCode, read, readMaybeDeletedMethods inherited from class com.dropbox.core.util.Dumpable
toString, toString, toStringMultiline, toStringMultiline
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
numBytes
public final long numBytesThe size, in bytes, of the file content. -
humanSize
A human-readable string version of the file size (ex: "13 kb"). This string will be localized based on theLocaleinDbxRequestConfig.userLocale(passed in to theDbxClientV1constructor). -
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 theclientMtimeis a better estimate.) -
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
The revision of the file at this path. This can be used withDbxClientV1.uploadFile(java.lang.String, com.dropbox.core.v1.DbxWriteMode, long, java.io.InputStream)and theDbxWriteMode.update(java.lang.String)mode to make sure you're overwriting the revision of the file you think you're overwriting. -
photoInfo
If this file is a photo, this may contain additional photo-related information. This field is only populated if you use theincludeMediaInfo -
videoInfo
Contains details about this file if it is a video -
Reader
-
ReaderMaybeDeleted
-
-
Constructor Details
-
File
public File(String path, String iconName, boolean mightHaveThumbnail, long numBytes, String humanSize, Date lastModified, Date clientMtime, String rev, DbxEntry.File.PhotoInfo photoInfo, DbxEntry.File.VideoInfo videoInfo) - Parameters:
path-DbxEntry.pathiconName-DbxEntry.iconNamemightHaveThumbnail-DbxEntry.mightHaveThumbnailnumBytes-numByteshumanSize-humanSizelastModified-lastModifiedclientMtime-clientMtimerev-revphotoInfo-photoInfovideoInfo-videoInfo
-
File
-
-
Method Details
-
dumpFields
- Overrides:
dumpFieldsin classDbxEntry
-
getTypeName
- Overrides:
getTypeNamein classDumpable
-
isFolder
public boolean isFolder()Description copied from class:DbxEntryWhether this metadata is for a folder, which can be cast to typeDbxEntry.Folder. (Every metadata object is either for a file or a folder.) -
isFile
public boolean isFile()Description copied from class:DbxEntryWhether this metadata is for a file, which can be cast to typeDbxEntry.File. (Every metadata object is either for a file or a folder.) -
asFolder
Description copied from class:DbxEntryIf this metadata entry is a folder, return it as aDbxEntry.Folderinstance. If it's not a folder, returnnull. -
asFile
Description copied from class:DbxEntryIf this metadata entry is a file, return it as aDbxEntry.Fileinstance. If it's not a file, returnnull. -
equals
-
equals
-
hashCode
public int hashCode()
-