List Info

Thread: Mono.Unix questions




Mono.Unix questions
user name
2007-02-07 09:15:31
Hey
     ;  I am trying to complete an exercise from 'Mono: A Developers Handbook' and it goes on about using Mono.Posix however a little bit of checking on the documentation page tells me it's now Mono.Unix, however replacing Mono.Posix with Mono.Unix hasn't worked, what are the things that have changed to I can write a post-it in my book reminding me what things are now?

The code in question is this

using SysCall;

namespace SysCall
{
    class ChmodTest
  ;  {
        public static void Main ( string [] args )
        {
            string sFile = args [ 0 ];
            Syscall.chmod ( sFile, ( FileMode ) 0x777 );
       
            int uid = Syscall.getuid ( );
            int gid = Syscall.getgid ( );
            Syscall.chown ( sFile, uid, gid );
        }
    }
}

Many thanks
Neil Munro

--
Stay shiny 
Keep Flyin'
----------------
Njal
Re: Mono.Unix questions
user name
2007-02-07 09:28:24
On 2/7/07, Neil Munro <neilmunrogmail.com> wrote:
> Hey
>        I am trying to complete an exercise from 'Mono:
A Developers
> Handbook' and it goes on about using Mono.Posix however
a little bit of
> checking on the documentation page tells me it's now
Mono.Unix, however
> replacing Mono.Posix with Mono.Unix hasn't worked, what
are the things that
> have changed to I can write a post-it in my book
reminding me what things
> are now?
>
> The code in question is this
>
> using SysCall;

Syscall is a class in the Mono.Unix.Native namespace.  The
above line should be:

using Mono.Unix.Native;

Then your calls to Syscall should work.  You still need to
compile
with "-r:Mono.Posix", I believe.

MonoDoc is a great utility to help you explore the current
Mono APIs
when you have trouble finding or using certain pieces.

Have fun,
Sandy

P.S. Sorry for two emails, Neil... forgot to reply-all!
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )