예제 #1
0
  /**
   * Lists the children of the file. Is only called if {@link #doGetType} returns {@link
   * FileType#FOLDER}.
   */
  @Override
  protected String[] doListChildren() throws Exception {
    // VFS-210: do not try to get listing for anything else than directories
    if (!file.isDirectory()) {
      return null;
    }

    return UriParser.encode(file.list());
  }
  private Map<String, String> parseSchemeFileOptions(String fileURI) {
    String scheme = UriParser.extractScheme(fileURI);
    if (scheme == null) {
      return null;
    }
    HashMap<String, String> schemeFileOptions = new HashMap<String, String>();
    schemeFileOptions.put(VFSConstants.SCHEME, scheme);

    try {
      addOptions(scheme, schemeFileOptions);
    } catch (Exception e) {
      log.warn("Error while loading VFS parameter. " + e.getMessage());
    }
    return schemeFileOptions;
  }
예제 #3
0
 /** Returns the children of the file. */
 @Override
 protected String[] doListChildren() throws Exception {
   return UriParser.encode(file.list());
 }