Thanks to you and jonathan. You are right, i don't need (at this moment) any native calls, maybe in the future i will use mixed solution. i was thinking that maybe it was faster Mono.Unix than System.IO.
Thanks! Bye. Luciano >From: David Brown <[EMAIL PROTECTED]> >To: Luciano _ <[EMAIL PROTECTED]> >CC: mono-devel-list@lists.ximian.com >Subject: Re: [Mono-dev] System.IO or Mono.Unix >Date: Fri, 22 Dec 2006 10:58:19 -0800 >MIME-Version: 1.0 >Received: from mail.davidb.org ([66.93.32.219]) by >bay0-mc9-f7.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Fri, 22 >Dec 2006 10:59:05 -0800 >Received: from a64.davidb.org ([66.93.32.226])by mail.davidb.org with >esmtpa (Exim 4.62 #1 (Debian))id 1Gxpb1-0000w0-Lx; Fri, 22 Dec 2006 >10:58:19 -0800 >X-Message-Info: LsUYwwHHNt3660MmjhEvYg2f34OAemlK3oXsmRrh6gU= >User-Agent: Thunderbird 1.5.0.8 (X11/20061111) >References: <[EMAIL PROTECTED]> >Return-Path: [EMAIL PROTECTED] >X-OriginalArrivalTime: 22 Dec 2006 18:59:06.0315 (UTC) >FILETIME=[412289B0:01C725FB] > >Luciano _ wrote: > > > First: I'm developing an application that use System.IO and i read that > > there are some IO operation classes in the Mono.Unix namespace. Which >is the > > best solution? System.IO or Mono.Unix? I'm developing a Linux-Only > > Application. > >The simple answer would be: does your application depend on knowledge of >the specifics of Linux or Unix filesystem semantics? If so, you should use >the native calls. Otherwise, use the portable calls. > >For example, writing Linux backup software would definitely need to use the >Mono.Unix calls, since the program needs to accurately backup the >information directly. > > > Second: Could someone explain (example) how > > Mono.Unix.DirectoryInfo.GetEntries works? i need to get all the > > directories/files/symbolic links and: length, datetime creation and > > modified, fullpath, etc. I don't understand how to use the returned >value > > (Mono.Unix.Native.Dirent) and how to convert to UnixFileInfo or > > UnixSymbolicLinkInfo. > >The only portable field in the Dirent is d_name, which will give you a >string. Use Mono.Unix.Native.lstat to get the rest of the information. >The names UnixSymbolicLinkInfo and UnixFileInfo are kind of misleading. I >personally think that wrapper is more confusing than it is worth. The >lstat will fill in a Mono.Unix.Native.Stat which will have what you want. >Remember, you might need the routines in Mono.Unix.Marshal to convert the >Posix time fields to something useful in the rest of Mono. I have not had >success doing these conversions without confusion between localtime and >UTC, though. > >The question you are asking suggests you need to use the native calls. > >Dave > _________________________________________________________________ Visita MSN Latino Entretenimiento: ¡música, cine, chismes, TV y más...! http://latino.msn.com/entretenimiento/ _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list