[Python-ideas] PEP 428 - object-oriented filesystem paths

Oleg Broytman phd at phdru.name
Mon Oct 8 16:28:12 CEST 2012


On Mon, Oct 08, 2012 at 03:59:18PM +0200, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
> On 8 Oct, 2012, at 13:07, Oleg Broytman <phd at phdru.name> wrote:
> 
> > On Mon, Oct 08, 2012 at 12:00:22PM +0200, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
> >> Or CIFS filesystems mounted on a Linux?   Case-sensitivity is a file-system property, not a operating system one.
> > 
> >   But there is no API to ask what type of filesystem a path belongs to.
> > So guessing by OS name is the only heuristic we can do.
> 
> I guess so, as neither statvs, statvfs,  nor pathconf seem to be able to tell if a filesystem is case insensitive.
> 
> The alternative would be to have a list of case insentive filesystems and use that that when comparing impure path objects. That would be fairly expensive though, as you'd have to check for every element of the path if that element is on a case insensitive filesystem.

   If a filesystem mounted to w32 is exported from a server by CIFS/SMB
protocol -- is it case sensitive? What if said server is Linux? What if
said filesystem was actually imported to Linux from a Novel server by
NetWare Core Protocol. It's not a fictional situation -- I do it at
oper.med.ru; the server is Linux that mounts two CIFS and NCP filesystem
and reexport them via Samba.

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.



More information about the Python-ideas mailing list