+ public String getEtag() {
+ return mEtag;
+ }
+
+ public void setEtag(String etag) {
+ this.mEtag = etag;
+ }
+
+
+ public boolean isShareByLink() {
+ return mShareByLink;
+ }
+
+ public void setShareByLink(boolean shareByLink) {
+ this.mShareByLink = shareByLink;
+ }
+
+ public String getPublicLink() {
+ return mPublicLink;
+ }
+
+ public void setPublicLink(String publicLink) {
+ this.mPublicLink = publicLink;
+ }
+
+ public long getLocalModificationTimestamp() {
+ if (mLocalPath != null && mLocalPath.length() > 0) {
+ File f = new File(mLocalPath);
+ return f.lastModified();
+ }
+ return 0;
+ }
+
+ /** @return 'True' if the file contains audio */
+ public boolean isAudio() {
+ return (mMimeType != null && mMimeType.startsWith("audio/"));
+ }
+
+ /** @return 'True' if the file contains video */
+ public boolean isVideo() {
+ return (mMimeType != null && mMimeType.startsWith("video/"));
+ }
+
+ /** @return 'True' if the file contains an image */
+ public boolean isImage() {
+ return ((mMimeType != null && mMimeType.startsWith("image/")) ||
+ getMimeTypeFromName().startsWith("image/"));
+ }
+
+ public String getMimeTypeFromName() {
+ String extension = "";
+ int pos = mRemotePath.lastIndexOf('.');
+ if (pos >= 0) {
+ extension = mRemotePath.substring(pos + 1);
+ }
+ String result = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase());
+ return (result != null) ? result : "";
+ }
+