[Mono-dev] accessing file on a windows share

2005-11-16 Thread Buderya Roshan
Hi,

I am trying to access a file on a remote share (Windows share with full
access to everyone). On windows using .net I can access and read the
file as

StreamReader sr = new
StreamReader(@\\server_name\share_name\file_name);
string line = sr.ReadLine();

But when I compile  run the same under mono for windows, I get
System.IO.DirectoryNotFoundException.  How do I specify the filepath in
mono? Also when this is running from Linux (Samba client setup) do I
need to do something else?

Thanks,
Roshan
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] accessing file on a windows share

2005-11-16 Thread Buderya Roshan
 Buderya Roshan 11/17/05 12:25 PM 
 Buderya Roshan [EMAIL PROTECTED] 11/16/05 5:07 PM 
 Hi,
 
 I am trying to access a file on a remote share (Windows share with
full
 access to everyone). On windows using .net I can access and read the
 file as

 StreamReader sr = new
 StreamReader(@\\server_name\share_name\file_name);
 string line = sr.ReadLine();

 But when I compile  run the same under mono for windows, I get
 System.IO.DirectoryNotFoundException.  How do I specify the filepath
in
 mono? Also when this is running from Linux (Samba client setup) do I
 need to do something else?

Answering my own question, using mono on Linux, I figured (with some
help from the mono IRC channel) we need to use Gnome.Vfs library to
access remote shares. A URI of the form
smb://user:[EMAIL PROTECTED]/path_to_file/ should work.

Thanks,
Roshan
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list