[Python-ideas] PEP 428 - object-oriented filesystem paths
Ronald Oussoren
ronaldoussoren at mac.com
Mon Oct 8 15:59:18 CEST 2012
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.
Ronald
More information about the Python-ideas
mailing list