public String which(String sessionID,String path) throws DirectoryNotFoundException {
  ResourceNode node=null;
  try {
    node=locate(sessionID,path);
  }
 catch (  DirectoryNotFoundException d) {
    return null;
  }
  String thePath=formatPath(getAbsolutePath(getRootNode(),node,true),true);
  int paramStart=thePath.indexOf("(");
  if (paramStart != -1) {
    return thePath.substring(0,paramStart);
  }
  return thePath;
}

public String which ( String sessionID , String path ) throws DirectoryNotFoundException { ResourceNode node = null ; try { node = locate ( sessionID , path ) ; } catch ( DirectoryNotFoundException d ) { return null ; } String thePath = formatPath ( getAbsolutePath ( getRootNode ( ) , node , true ) , true ) ; int paramStart = thePath . indexOf ( "(" ) ; if ( paramStart != - 1 ) { return thePath . substring ( 0 , paramStart ) ; } return thePath ; }
this command returns the full path to a given resource , as long as the resource exists
