org.linkedin.util-core/src/main/java/org/linkedin/util/io/resource/internal/RAMResourceProvider.java
@Override
  public boolean doList(String path, ResourceFilter filter)
  {
    if(_root == null)
      return false;

    RAMEntry entry = _root.getEntryByPath(path);

    if(entry instanceof RAMDirectory)
    {
      RAMDirectory ramDirectory = (RAMDirectory) entry;
      for(RAMEntry ramEntry : ramDirectory.ls())
      {
        String resourcePath = PathUtils.addPaths(path, ramEntry.name());
        filter.accept(new RAMResource(this,
                                      getFullPath(resourcePath),
                                      resourcePath));
      }
      return true;
    }
    else
      return false;
  }
@Override
  public boolean doList(String path, ResourceFilter filter)
  {
    if(_root == null)
      return false;

    RAMEntry entry = _root.getEntryByPath(path);

    if(entry instanceof RAMDirectory)
    {
      RAMDirectory ramDirectory = (RAMDirectory) entry;
      for(RAMEntry ramEntry : ramDirectory.ls())
      {
        String resourcePath = PathUtils.addPaths(path, ramEntry.name());
        filter.accept(new RAMResource(this,
                                      getFullPath(resourcePath),
                                      resourcePath));
      }
      return true;
    }
    else
      return false;
  }
@ Override public boolean doList ( String path , ResourceFilter filter ) { if ( _root == null ) return false ; RAMEntry entry = _root . getEntryByPath ( path ) ; if ( entry instanceof RAMDirectory ) { RAMDirectory ramDirectory = ( RAMDirectory ) entry ; for ( RAMEntry ramEntry : ramDirectory . ls ( ) ) { String resourcePath = PathUtils . addPaths ( path , ramEntry . name ( ) ) ; filter . accept ( new RAMResource ( this , getFullPath ( resourcePath ) , resourcePath ) ) ; } return true ; } else return false ; }
If the path denotes a directory, then it will return all resources that are contained in the
directory.

@param path   the path to the resource
@param filter the filter to include only some resources in the result
@return <code>true</code> if it was a directory, <code>false</code> otherwise
@throws IOException if there is an error accessing the resource
If the path denotes a directory then it will return all resources that are contained in the directory .