Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sat, 21 Dec 2002 18:59:49 -0800 (PST) From: Michael A Chase Subject: Re: Perl package File::Spec confused under cygwin To: cygwin AT cygwin DOT com, "linda w (cyg)" Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Disposition: INLINE references: <000a01c2a95a$9e5ea9f0$1403a8c0 AT sc DOT tlinx DOT org> in-reply-to: <000a01c2a95a$9e5ea9f0$1403a8c0@sc.tlinx.org> Reply-To: Michael A Chase On Sat, 21 Dec 2002 17:36:58 -0800 "linda w (cyg)" wrote: >> Note that Cygwin, like Unix, doesn't have a concept of >> volume. Everything except network paths (//host/dir) are >> based on a single root directory. > --- > But Unix does have a concept of a mount point (device) and > path from the mount point. Conceivably, one could view the > mount point itself as a local host name for the "volume" (local, remote or a > device) with path being location on the mounted fs. device != volume. For the purposes of File::Spec, it would be better to leave the directory structure as a single tree. > It is arbitrary to choose to see the /fs as one giant undifferentiated > tree. But that is the convention used by Unix and hence Cygwin. You can distinguish which device a file or directory is in by using the first element returned by stat(), but that doesn't affect the file spec. >> You can always call File::Spec::Win32 -> splitpath() to get >> that behavior. > --- > Well, for 'portability' one shouldn't call :: anything. > The purpose of File::Spec was to provide a OS independent way to > deconstruct/construct pathnames into their separate components. Portability is a worthy goal, but sometimes you have to accomodate your specific environment, that's why $^O is available. >> It does, but File::Spec::Cygwin is very close to File::Spec::Unix. > --- > Yeah...got that. I guess most immediate fix would be to fix > the Cygwin version to differentiate things... then if it was > important, one could split the path to mount:path for more useful, yet > spec-compatible functionality. If you submit a Perl bug report with a patch that does what you want and explains why you want it, it is likely to get included in the next release of Perl. If you talk nice to Gerrit, you may even get it in the next build of Cygwin Perl pending a change to the base source. Borrowed code from File/Spec/Win32.pm may provide a start. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/