◆ RepositoryFile()
org.turro.elephant.impl.repository.RepositoryFile.RepositoryFile |
( |
File |
file, |
|
|
IConstructor |
constructor |
|
) |
| |
◆ compareTo()
int org.turro.elephant.impl.repository.RepositoryFile.compareTo |
( |
RepositoryFile |
o | ) |
|
Definition at line 116 of file RepositoryFile.java.
117 int result = CompareUtil.compare(file.isFile(), o.getFile().isFile());
119 result = CompareUtil.compare(file.getName(), o.getFile().getName());
◆ getByteString()
String org.turro.elephant.impl.repository.RepositoryFile.getByteString |
( |
| ) |
|
Definition at line 92 of file RepositoryFile.java.
93 return new BytesFormatter(file.length()).toString();
◆ getDateString()
String org.turro.elephant.impl.repository.RepositoryFile.getDateString |
( |
| ) |
|
Definition at line 96 of file RepositoryFile.java.
97 return DateFormats.format(
new Date(file.lastModified()),
98 DateFormat.SHORT, I_.api().used());
◆ getFile()
File org.turro.elephant.impl.repository.RepositoryFile.getFile |
( |
| ) |
|
◆ getFiles()
File [] org.turro.elephant.impl.repository.RepositoryFile.getFiles |
( |
String |
pattern | ) |
|
Definition at line 124 of file RepositoryFile.java.
125 File repository = file;
126 final String patterns[] = pattern.split(
",");
127 return repository.listFiles(
new FileFilter() {
129 public boolean accept(File pathname) {
130 if(pathname.isFile() && !pathname.isHidden()) {
131 for(String p : patterns) {
132 if(Strings.compareIgnoreCase(pathname.getName(), p)) {
◆ getFolders()
File [] org.turro.elephant.impl.repository.RepositoryFile.getFolders |
( |
String |
pattern | ) |
|
Definition at line 142 of file RepositoryFile.java.
143 File repository = file;
144 final String patterns[] = pattern.split(
",");
145 return repository.listFiles(
new FileFilter() {
147 public boolean accept(File pathname) {
148 if(pathname.isDirectory() && !pathname.isHidden()) {
149 for(String p : patterns) {
150 if(Strings.compareIgnoreCase(pathname.getName(), p)) {
◆ getMimeImage()
String org.turro.elephant.impl.repository.RepositoryFile.getMimeImage |
( |
| ) |
|
Definition at line 85 of file RepositoryFile.java.
86 return FontAwesome.getMimeIcon(FileUtil.getExtension(file));
◆ getName()
String org.turro.elephant.impl.repository.RepositoryFile.getName |
( |
| ) |
|
◆ getProperties()
Properties org.turro.elephant.impl.repository.RepositoryFile.getProperties |
( |
| ) |
|
Definition at line 101 of file RepositoryFile.java.
102 if(properties ==
null) {
103 properties =
new Properties();
104 File fprop =
new File(FileUtil.getBasePath(file) +
".properties");
106 try (InputStream is =
new FileInputStream(fprop)) {
107 properties.load(
new InputStreamReader(is, ElephantContext.getEncoding()));
108 }
catch (IOException ex) {
◆ getRepositoryFiles()
Set<RepositoryFile> org.turro.elephant.impl.repository.RepositoryFile.getRepositoryFiles |
( |
String |
pattern | ) |
|
Definition at line 160 of file RepositoryFile.java.
162 TreeSet<RepositoryFile>
set =
new TreeSet<>();
164 for(File f : files) {
RepositoryFile(File file, IConstructor constructor)
File[] getFiles(String pattern)
◆ getRepositoryFolders()
Set<RepositoryFile> org.turro.elephant.impl.repository.RepositoryFile.getRepositoryFolders |
( |
String |
pattern | ) |
|
Definition at line 171 of file RepositoryFile.java.
173 TreeSet<RepositoryFile>
set =
new TreeSet<>();
175 for(File f : files) {
File[] getFolders(String pattern)
◆ getThumbWebPath()
String org.turro.elephant.impl.repository.RepositoryFile.getThumbWebPath |
( |
| ) |
|
Definition at line 79 of file RepositoryFile.java.
80 StringBuilder webPath =
new StringBuilder(
getWebPath());
81 webPath.insert(webPath.lastIndexOf(
"/"),
"/thumbs");
82 return webPath.toString();
◆ getWebPath()
String org.turro.elephant.impl.repository.RepositoryFile.getWebPath |
( |
| ) |
|
Definition at line 73 of file RepositoryFile.java.
74 return file.getAbsolutePath().replace(
75 ElephantContext.getRealPath(
"/"),
76 ElephantContext.getRootWebPath());
◆ hasContent()
boolean org.turro.elephant.impl.repository.RepositoryFile.hasContent |
( |
| ) |
|
Definition at line 57 of file RepositoryFile.java.
58 return file.isDirectory() && file.list().length > 0;
◆ isFolder()
boolean org.turro.elephant.impl.repository.RepositoryFile.isFolder |
( |
| ) |
|
The documentation for this class was generated from the following file: