[Mono-dev] File.Copy on unix with symbolic link

lorenzo lorenzo.delana at gmail.com
Mon Mar 5 01:31:54 EST 2007


I'm developing a backup utility and this involves the use of File.Copy static 
method to make a copy of a file to another file.

On Windows:
a link to another file or directory ( the .lnk extension file ) is copied as 
is to destination.

On Linux:
a link to another file or directory ( the symlink ) is dereferenced and the 
destination result in the dereferenced file or directory.

Why is used this implementation of the File.Copy w/symlink on Unix?
The application work very different if I execute the same IL code on different 
platform. Is necessary to mantain this different behavior?

Is there another solution to make a symlink copied as a symlink without using 
Mono.Unix libraries?

thanks,
lorenzo.




More information about the Mono-devel-list mailing list