comparison src/luan/modules/IoLuan.java @ 1795:745f756e719b

make copy_to recursive
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 02 Jan 2024 21:49:54 -0700
parents 2dbcc8360a3e
children
comparison
equal deleted inserted replaced
1794:04ac5f2771c8 1795:745f756e719b
453 453
454 public void copy_to(Luan luan,Object destObj) throws LuanException, IOException { 454 public void copy_to(Luan luan,Object destObj) throws LuanException, IOException {
455 File dest = objToFile(luan,destObj); 455 File dest = objToFile(luan,destObj);
456 if( dest==null ) 456 if( dest==null )
457 throw new LuanException( "bad argument #1 to 'copy_to' (string or file table expected)" ); 457 throw new LuanException( "bad argument #1 to 'copy_to' (string or file table expected)" );
458 IoUtils.copy(file,dest); 458 IoUtils.copyRecursively(file,dest);
459 } 459 }
460 460
461 public void link_from(Luan luan,Object linkObj) throws LuanException, IOException { 461 public void link_from(Luan luan,Object linkObj) throws LuanException, IOException {
462 File link = objToFile(luan,linkObj); 462 File link = objToFile(luan,linkObj);
463 if( link==null ) 463 if( link==null )