public boolean isFolder(String file) throws RemoteFileSystemException { final GridFile f = createGsiftpGridFile(file); final Map<String, String> urls = DtoProperty.mapFromDtoPropertiesList(f.getUrls()); for (final String key : urls.keySet()) { if (key.startsWith("gsiftp")) { return user.getFileManager().isFolder(key); } } throw new RemoteFileSystemException("IsFolder not supported for virtual file system."); }
public String upload(DataHandler source, String filename) throws RemoteFileSystemException { final GridFile f = createGsiftpGridFile(filename); final Map<String, String> urls = DtoProperty.mapFromDtoPropertiesList(f.getUrls()); for (final String key : urls.keySet()) { if (key.startsWith("gsiftp")) { return user.getFileManager().upload(source, key); } } throw new RemoteFileSystemException("Upload not supported for virtual file system."); }
public long lastModified(String url) throws RemoteFileSystemException { final GridFile f = createGsiftpGridFile(url); final Map<String, String> urls = DtoProperty.mapFromDtoPropertiesList(f.getUrls()); for (final String key : urls.keySet()) { if (key.startsWith("gsiftp")) { return user.getFileManager().lastModified(key); } } throw new RemoteFileSystemException("Last modified not supported for virtual file system."); }