Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 83256 invoked by uid 500); 18 Apr 2002 03:29:35 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 83245 invoked from network); 18 Apr 2002 03:29:34 -0000 Message-ID: <3CBE3DA5.8080906@stason.org> Date: Thu, 18 Apr 2002 11:29:41 +0800 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/00200203 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "William A. Rowe, Jr." Cc: dev@apr.apache.org Subject: Re: Split paths portability References: <5.1.0.14.2.20020417141057.02418928@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N William A. Rowe, Jr. wrote: > While we consider Stas' ideas for a portable tmpdir, we should also > consider > breaking apart path strings (such as env('PATH'), or LIB or INCLUDE paths > as well.) These semantics change considerably from Win32 to unix and > other platforms. I dunno what NetWare does here, anymore. If you need the implementation details look at how Perl does it. it's in File::Spec which is a set of function working on Files/Dirs crossplatform. In this particular case these are the functions you want to look at: splitpath splitdir catdir catfile and a few other useful functions. Currently Perl includes implementations for: /home/stas/perl.org/perl-current/lib/File/Spec/Cygwin.pm /home/stas/perl.org/perl-current/lib/File/Spec/Epoc.pm /home/stas/perl.org/perl-current/lib/File/Spec/Mac.pm /home/stas/perl.org/perl-current/lib/File/Spec/OS2.pm /home/stas/perl.org/perl-current/lib/File/Spec/Unix.pm /home/stas/perl.org/perl-current/lib/File/Spec/VMS.pm /home/stas/perl.org/perl-current/lib/File/Spec/Win32.pm -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com