import third_parties.daveKoeller.AlphanumComparator;
public class OCFile implements Parcelable, Comparable<OCFile> {
- public static final Parcelable.Creator<OCFile> CREATOR = new Parcelable.Creator<OCFile>() {
- @Override
+ public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
public OCFile createFromParcel(Parcel source) {
return new OCFile(source);
}
- @Override
public OCFile[] newArray(int size) {
return new OCFile[size];
}
private boolean mIsDownloading;
+ private boolean mShowGridView;
+
/**
* Create new {@link OCFile} with given path.
getMimeTypeFromName().startsWith("image/"));
}
+ /**
+ * @return 'True' if the file is simple text (e.g. not application-dependent, like .doc or .docx)
+ */
+ public boolean isText() {
+ return ((mMimeType != null && mMimeType.startsWith("text/")) ||
+ getMimeTypeFromName().startsWith("text/"));
+ }
+
public String getMimeTypeFromName() {
String extension = "";
int pos = mRemotePath.lastIndexOf('.');