public ResourceFile getFile(String name) { FileResource res = this.service.getResource(new FileResourceName(this.name, name)); if ((res != null) && !res.isFolder()) { return new ResourceFileImpl(this.service, res.getName()); } return null; }
public ResourceFolder createFolder(String name) { this.service.createFolder(new FileResourceName(this.name, name)); FileResource res = this.service.getResource(new FileResourceName(this.name, name)); if ((res != null) && res.isFolder()) { return new ResourceFolderImpl(this.service, res.getName()); } return null; }
public List<ResourceFile> getFiles() { List<ResourceFile> files = new ArrayList<ResourceFile>(); for (FileResourceName child : this.service.getChildren(this.name)) { FileResource res = this.service.getResource(child); if (res != null && !res.isFolder()) { files.add(new ResourceFileImpl(this.service, res.getName())); } } return files; }