Exemplo n.º 1
0
 @Override
 public PnfsId createDirectory(Subject subject, String path, FileAttributes attributes)
     throws CacheException {
   PnfsHandler pnfs = new PnfsHandler(_pnfs, subject, Restrictions.none());
   attributes.setFileType(DIR);
   PnfsCreateEntryMessage returnMsg = pnfs.createPnfsDirectory(path, attributes);
   return returnMsg.getPnfsId();
 }
Exemplo n.º 2
0
 @Override
 public FileAttributes createFile(
     Subject subject,
     String path,
     FileAttributes assignAttributes,
     Set<FileAttribute> requestedAttributes)
     throws CacheException {
   PnfsHandler pnfs = new PnfsHandler(_pnfs, subject, Restrictions.none());
   assignAttributes.setFileType(REGULAR);
   PnfsCreateEntryMessage message =
       new PnfsCreateEntryMessage(path, assignAttributes, requestedAttributes);
   return pnfs.request(message).getFileAttributes();
 }