]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/web/ajaxplorer/file/FileDriver.java
d38ab321589151e985820da6680f2cc3e5557d25
1 package org
.argeo
.slc
.web
.ajaxplorer
.file
;
5 import org
.argeo
.slc
.web
.ajaxplorer
.SimpleAjxpDriver
;
7 public class FileDriver
extends SimpleAjxpDriver
{
8 private String basePath
;
9 private String encoding
= "UTF-8";
11 public String
getBasePath() {
15 public File
getBaseDir(){
16 return new File(getBasePath());
19 public void setBasePath(String basePath
) {
20 if (basePath
.charAt(basePath
.length() - 1) != File
.separatorChar
)
21 basePath
= basePath
+ File
.separatorChar
;
22 this.basePath
= basePath
;
25 public String
getEncoding() {
29 public void setEncoding(String encoding
) {
30 this.encoding
= encoding
;
33 public File
getFile(String relpath
) {
34 return new File(getBasePath() + relpath
).getAbsoluteFile();
37 public File
getFile(String dir
, String fileName
) {
38 return getFile(dir
+ File
.separator
+ fileName
);