Ejemplo n.º 1
0
 @Delegate(
     interfaceName = "com.ocean.FttpWorker",
     methodName = "renameFile",
     policy = DelegatePolicy.Implements)
 public boolean rename(String fp, String newname) throws RemoteException, FttpException {
   boolean r = false;
   FileAdapter fa = new FileAdapter(fp);
   try {
     File nf = new File(fa.getParent(), newname);
     r = fa.renameTo(nf);
   } catch (Exception e) {
     fa.close();
     throw new FttpException(e);
   }
   fa.close();
   return r;
 }