develooper Front page | perl.perl5.porters | Postings from September 2005

Re: Pls Review: File::System::Spec

Thread Previous | Thread Next
From:
Yuval Kogman
Date:
September 30, 2005 04:42
Subject:
Re: Pls Review: File::System::Spec
Message ID:
20050930114220.GJ29485@woobling.org
On Fri, Sep 30, 2005 at 00:56:09 -0400, John E. Malmberg wrote:
> Michael G Schwern wrote:
>  >
>  > Put the logic in a module.  Put the module on CPAN.
>  >
>  > And this part is really my fault.  I've been meaning to write
>  > File::System::Spec and Operating::System::Spec for a long time
>  > now to allow easy answers to just these sorts of questions.
> 
> Would this fit the bill?  It is a File::System::Spec.
> 
> It gives 0 or 1 answers for UNIX and VMS and undef for other platforms until those can be added.

The logic is problematic...

On OSX, for example, I could mount an HFS file system that is case
sensitive or not, interact with SMB on windows which is not, SMB on
samba which i suspect is, FAT-xx and NTFS which is not, and other
file systems.

This is all under one tree, to make things more yucky.

The current interface is good enough for the default filesystem, I
guess, but you should  be able to ask about a specific file system,
e.g.:

	my $x = File::System::Spec->new(File::Spec->catfile(.. the path  ...));

	$x->case_tolerant; # asks about the filesystem hosting the path

-- 
 ()  Yuval Kogman <nothingmuch@woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About