use of org.objectweb.proactive.extensions.dataspaces.api.FileType in project scheduling by ow2-proactive.
the class TaskProActiveDataspaces method createFolderHierarchy.
protected void createFolderHierarchy(boolean isDebugEnabled, DataSpacesFileObject fileObject, DataSpacesFileObject target) throws FileSystemException {
FileType fileObjectType = fileObject.getType();
if (FileType.FOLDER.equals(fileObjectType)) {
if (isDebugEnabled) {
logger.debug("Creating folder " + target.getRealURI());
}
if (!target.exists()) {
target.createFolder();
setFolderRightsForRunAsUserMode(target);
}
} else if (FileType.FILE.equals(fileObjectType)) {
DataSpacesFileObject parent = target.getParent();
if (isDebugEnabled) {
logger.debug("Creating folder " + parent.getRealURI());
}
if (!parent.exists()) {
parent.createFolder();
setFolderRightsForRunAsUserMode(parent);
}
}
}
Aggregations