Пример #1
0
  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.");
  }
Пример #2
0
  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.");
  }
Пример #3
0
  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.");
  }