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 From: "linda w \(cyg\)" To: Subject: RE: Perl package File::Spec confused under cygwin Date: Sat, 21 Dec 2002 17:36:58 -0800 Message-ID: <000a01c2a95a$9e5ea9f0$1403a8c0@sc.tlinx.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal > 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. It is arbitrary to choose to see the /fs as one giant undifferentiated tree. I would argue that it is certainly not only in line with the existing specification, but may also provide useful information to return the volume path split out from the path within the volume. Theoretically, if people have followed the spec for FILE::Spec, to reconstitute a deconstituted path, they shouldn't assume volume is non-zero (hardly a good assumption if what you are interested in is portability). > Mixed file specifications like c:/x/y/z are handled by many > programs in the Cygwin environment, but such paths are not > really valid. File::Spec::Win32 accepts '/' as well as '\' > as a directory separator. --- That makes sense as there used to be environment or config.sys option, 'SWITCHCHAR', that you could specify the switch char as '-' instead of '/', with the result that '/' was treated the same as '\' as a pathname separator. > That's exactly the situation. File::Spec::Cygwin for Perl > 5.8 only overrides file_name_is_absolute() and canonpath(); > other than that it's pure File::Spec::Unix. I'm sure the > Perl Porters would be willing to examine a patch to handle > mixed specs. --- Ah...so there is a separate Cygwin...guess that answers one question. > 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. > 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. Didn't know Cygwin had it's own module...thanks! Linda -- 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/