[Mono-list] Mono C# and Windows Shares

Jonathan Pryor jonpryor@vt.edu
Fri, 21 Jan 2005 06:51:33 -0500


On Fri, 2005-01-21 at 12:04 +0100, Trygve Falch wrote:
> On Fri, 2005-01-21 at 10:55 +0000, Dick Porter wrote:
> > On Fri, 2005-01-21 at 11:27 +0100, Trygve Falch wrote:
> 
> > > File.Copy using UNC-paths under windows works OK, but not surprisingly
> > > under say Linux.
> > We don't support UNC paths.  To do so would I think involve building
> > samba into mono, which is not sane.
> 
> Yeah, I know. But my question was rather; 'Is there a way to do that
> (eg. copying files to a windows-share from Linux using Mono) any other
> way?'

Yes, but they're lame. :-)

Simply use System.Diagnostics.Process to invoke the mount(1) command to
mount the windows share, then use File.Copy to the mounted share.
However, this may require root access to actually mount the share...

Alternatively, use Gnome.Vfs.  (Yes, it should be possible, and I have
no idea how to do it, and I think the Gnome.Vfs bindings are still in
development anyway...)

Whether these solutions are practical is another matter. :-)

 - Jon