FileInfo.java
2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package com.glsx.commonres.file;
/**
* Author by zh, Date on 2022/3/2.
* PS: write a bug or more,please indicate.
* 文件信息封装
*/
public class FileInfo {
public String name;
public String path;
public String size;
public String sduration;
public boolean selected;
public int fileType = 0;
public boolean isDirectory;
public long modifytime;
public long lsize = 0;
public int width;
public int height;
public int duration;
public boolean downloading = false;
public int downloadProgress = 0;
public int sub = 0;
public String url = null;
public String thunbnailUrl = null;
public int headerId;
public String address;
public boolean isRemoteFile = false;//是否为远程文件(非手机文件),用于区分打开文件的时候
public String remoteBeginTime;//用于显示远程文件的创建时间 格式:yy-MM-dd HH:mm:ss
public String remoteEndTime;//用于显示远程回看文件的创建时间 格式:yy-MM-dd HH:mm:ss
public String downLoadUrl;//用于给远程模式下文件下载的
public int cameraId;
public FileInfo() {
}
public FileInfo(String name, boolean isDirectory) {
this.name = name;
this.isDirectory = isDirectory;
this.selected = false;
}
public String getUrl() {
if (url != null)
return url;
else
return getFullPath();
}
public String getThunbnailUrl() {
if (thunbnailUrl != null)
return thunbnailUrl;
else
return getFullPath();
}
public int getHeaderId() {
return headerId;
}
public void setHeaderId(int headerId) {
this.headerId = headerId;
}
public String getFullPath() {
return path + name;
}
/**
* eg:"test.txt" return "text"
*/
public String getMainName() {
return null;
// return NetUtil.getMainName(name);
}
public long getModifytime() {
return modifytime;
}
@Override
public String toString() {
return "path:" + path + ", name:" + name + ", lsize:" + lsize + ",isDirectory:" + isDirectory
+ ",modifytime=" + modifytime + ",sub:" + sub;
}
}