forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFileInfo.java
More file actions
51 lines (44 loc) · 1.25 KB
/
FileInfo.java
File metadata and controls
51 lines (44 loc) · 1.25 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
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.util;
import java.util.Hashtable;
/**
* This class is used to store the information about a file or a directory
*
* @author longtv
*/
public class FileInfo {
public String name;
public String content;
public String size;
public boolean isDirectory;
public Hashtable<String, FileInfo> sub = null;
public FileInfo(String name, String content, String size, boolean isDirectory) {
this.name = name;
this.content = content;
this.size = size;
this.isDirectory = isDirectory;
}
public FileInfo(String name) {
this.name = name;
sub = new Hashtable<String, FileInfo>();
isDirectory = true;
}
public FileInfo(String content, boolean isDirectory) {
this.content = content;
this.isDirectory = isDirectory;
}
public FileInfo(String name, String size) {
this.name = name;
this.size = size;
isDirectory = false;
}
public void setSub(Hashtable<String, FileInfo> sub) {
this.sub = sub;
}
}