Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: preserving file permissions?

From: g:santilli:tiscalinet:it at: 23-Mar-2004 15:33

Hi Tom, On Tuesday, March 23, 2004, 2:40:25 AM, you wrote: TF> will using the /binary refinements of read and write TF> preserve file permissions exactly? Nope. You can use: clone-attributes: func [dest src /local modes] [ modes: context get-modes src get-modes src 'file-modes ; workaround for a bug in SET-MODES modes/modification-date: modes/modification-date - 0:00:02 set-modes dest third modes ] You could need the workaround depending on your platform. If you don't need it, the function can be reduced to: clone-attributes: func [dest src] [ set-modes dest get-modes src get-modes src 'file-modes ] (You can't rely too much on modification-date anyway on Windows, as it looks like it just does not have enough precision.) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/