// Downloads allowed, uploads allowed
nodeConfig.register("downloadAllowedDirs", new String[]{"all"}, sortOrder++, true, true, "NodeClientCore.downloadAllowedDirs",
"NodeClientCore.downloadAllowedDirsLong",
new StringArrCallback() {
@Override
public String[] get() {
synchronized(NodeClientCore.this) {
if(downloadAllowedEverywhere)
return new String[]{"all"};
String[] dirs = new String[downloadAllowedDirs.length + (includeDownloadDir ? 1 : 0)];
for(int i = 0; i < downloadAllowedDirs.length; i++)
dirs[i] = downloadAllowedDirs[i].getPath();
if(includeDownloadDir)
dirs[downloadAllowedDirs.length] = "downloads";
return dirs;
}
}
@Override
public void set(String[] val) throws InvalidConfigValueException {
setDownloadAllowedDirs(val);
}
});
setDownloadAllowedDirs(nodeConfig.getStringArr("downloadAllowedDirs"));
nodeConfig.register("uploadAllowedDirs", new String[]{"all"}, sortOrder++, true, true, "NodeClientCore.uploadAllowedDirs",
"NodeClientCore.uploadAllowedDirsLong",
new StringArrCallback() {
@Override
public String[] get() {
synchronized(NodeClientCore.this) {
if(uploadAllowedEverywhere)