29
29
30
30
import at .bitfire .dav4jvm .Property ;
31
31
import at .bitfire .dav4jvm .Response ;
32
- import at .bitfire .dav4jvm .property .*;
32
+ import at .bitfire .dav4jvm .property .CreationDate ;
33
+ import at .bitfire .dav4jvm .property .GetContentLength ;
34
+ import at .bitfire .dav4jvm .property .GetContentType ;
35
+ import at .bitfire .dav4jvm .property .GetETag ;
36
+ import at .bitfire .dav4jvm .property .GetLastModified ;
37
+ import at .bitfire .dav4jvm .property .OCId ;
38
+ import at .bitfire .dav4jvm .property .OCPermissions ;
39
+ import at .bitfire .dav4jvm .property .OCPrivatelink ;
40
+ import at .bitfire .dav4jvm .property .OCSize ;
41
+ import at .bitfire .dav4jvm .property .QuotaAvailableBytes ;
42
+ import at .bitfire .dav4jvm .property .QuotaUsedBytes ;
33
43
34
44
import java .io .File ;
35
45
import java .io .Serializable ;
@@ -83,7 +93,8 @@ public RemoteFile() {
83
93
/**
84
94
* Create new {@link RemoteFile} with given path.
85
95
* <p>
86
- * The path received must be URL-decoded. Path separator must be File.separator, and it must be the first character in 'path'.
96
+ * The path received must be URL-decoded. Path separator must be File.separator, and it must be the first
97
+ * character in 'path'.
87
98
*
88
99
* @param path The remote path of the file.
89
100
*/
@@ -95,7 +106,7 @@ public RemoteFile(String path) {
95
106
mRemotePath = path ;
96
107
mCreationTimestamp = 0 ;
97
108
mLength = 0 ;
98
- mMimeType = "DIR" ;
109
+ mMimeType = FileUtils . MIME_DIR ;
99
110
mQuotaUsedBytes = BigDecimal .ZERO ;
100
111
mQuotaAvailableBytes = BigDecimal .ZERO ;
101
112
mPrivateLink = null ;
@@ -154,6 +165,14 @@ protected RemoteFile(Parcel source) {
154
165
readFromParcel (source );
155
166
}
156
167
168
+ /**
169
+ * Use this to find out if this file is a folder.
170
+ *
171
+ * @return true if it is a folder
172
+ */
173
+ public boolean isFolder () {
174
+ return mMimeType != null && (mMimeType .equals (FileUtils .MIME_DIR ) || mMimeType .equals (FileUtils .MIME_DIR_UNIX ));
175
+ }
157
176
158
177
/**
159
178
* Getters and Setters
0 commit comments