if ((flags & FLAG_APPEND) != 0)
creationFlag = CreationFlagEnumeration.APPEND;
boolean deleteOnTerminate = (flags & FLAG_DELETE_ON_TERMINATE) != 0;
newDS.setCreationFlag(creationFlag);
newDS.setDeleteOnTermination(deleteOnTerminate);
SourceTargetType target = newDS.addNewTarget();
try {
uri = (uri == null) ? null : URIUtils.encodeAll(uri);
} catch (URIException e) {
}
target.setURI(uri);
newDS.setFileName(file);
if (fileSystem != null && !fileSystem.equals("Work")) { //$NON-NLS-1$
newDS.setFilesystemName(fileSystem);
}
}