Example #1
0
 public final TMetaDataPathDetail getMetaDataPathDetail(
     URI surl, int depth, long offset, long count, int recursionDepth, boolean longFormat)
     throws SRMException, URISyntaxException {
   FileMetaData fmd = getStorage().getFileMetaData(getUser(), surl, false);
   TMetaDataPathDetail aMetaDataPathDetail =
       convertFileMetaDataToTMetaDataPathDetail(surl, fmd, longFormat);
   if (!getContainerRequest().increaseResultsNumAndContinue()) {
     return aMetaDataPathDetail;
   }
   if (fmd.isDirectory && depth < recursionDepth) {
     if (recursionDepth == 1) {
       //
       // for simplicity break up code into two blocks - one block
       // works for the simple case recursionDepth=1, the other
       // block works for recursionDepth>1
       // there is a bit of code duplication, but code is
       // relatively straightforward this way
       //
       getMetaDataPathDetail(aMetaDataPathDetail, offset, count, longFormat);
     } else {
       getRecursiveMetaDataPathDetail(
           aMetaDataPathDetail, fmd, depth, offset, count, recursionDepth, longFormat);
     }
   }
   return aMetaDataPathDetail;
 }
Example #2
0
 public TMetaDataPathDetail[] getPathDetailArray() {
   int len = getFileRequests().size();
   TMetaDataPathDetail detail[] = new TMetaDataPathDetail[len];
   for (int i = 0; i < len; ++i) {
     LsFileRequest fr = getFileRequests().get(i);
     detail[i] = fr.getMetaDataPathDetail();
   }
   return detail;
 }