www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - about std.file.copy

reply bioinfornatics <bioinfornatics fedoraproject.org> writes:
Hi,

I want to copy a file with executable mode (755 on UNIX) to another
location. when i use std.file.copy original is into 755 bot not the
copied file!=20

The are a way to save the mode ?

thanks
Jun 24 2012
parent bioinfornatics <bioinfornatics fedoraproject.org> writes:
Le dimanche 24 juin 2012 =C3=A0 22:38 +0200, bioinfornatics a =C3=A9crit :
 Hi,
=20
 I want to copy a file with executable mode (755 on UNIX) to another
 location. when i use std.file.copy original is into 755 bot not the
 copied file!=20
=20
 The are a way to save the mode ?
=20
 thanks
=20
fixed by doing version( Posix ) chmod( dest.toStringz, S_IRUSR| S_IWUSR| S_IXUSR | S_IRGRP| S_IXGRP| S_IROTH | S_IXOTH );
Jun 24 2012