[Mono-list] How to mount a drive under mono

Chris Howie cdhowie at gmail.com
Thu Jul 30 11:22:20 EDT 2009


On Thu, Jul 30, 2009 at 11:09 AM, adrin<adrin84 at gmail.com> wrote:
> Hello,
> Is there any api in mono allowing to mount a drive?
> I can use 'mount' command and invoke it using 'normal' .NET external process
> execution pattern... but i wonder if there is a native, mono method for
> this?

There is not a way to do this short of implementing the P/Invoke
yourself or running a process.  See
<http://go-mono.com/docs/monodoc.ashx?tlink=18@ecma%3a285%23Syscall%2f>:

mount: Inherently non-portable across the various Unix flavours, and
will never be supported. Instead, use System.Diagnostics.Process and
invoke the command-line mount(8) program.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers


More information about the Mono-list mailing list