The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Wrangler::FileSystem::Layers - Filesystem abstraction for Wrangler

DEVELOPER NOTES

The idea behind Layers is to look at an inode's metadata from an unbiased perspective. That means, it tries to cover the fact that a file's/directory's properties usually come from low-level stat() calls, or inspection of the xattr realm and may even come from read()s to calculate a MIME-Type. But for a user, all what matters are the resulting attributes, the metadata, and whether a certain property is settable or not.

In a perfect world, this would be the end of it. But it's not that easy. Some properties are simple key-value pairs, easily settable by straightforward system calls. Yet, others are indirect results of other attributes, like a file's Basename, which is hierarchically linked with the full Filename. Or setting mtime, or xattr, will result in an update of atime, well, mostly.

All of this means, the logic in Layers has to deal with a lot of corner cases. And although this incarnation of Layers in Wrangler's 2.x branch is already a rewrite, yet another shot at tackling the problem, the initial concept is still not fully realised, and the implementation logic is only halfway there. The current implementation relies far too often on regular expressions. And it's internal hierarchy of figuring out which system call should handle getting/setting a certain attribute is quite simplistic. Also, an intended pluggable structure, in combination with the ability to overlay same-level mounts in a unionfs/merged transparent way, is not yet there. In sum, the efficiency of all this could be better, but at least for now, with some of the GUI widgets compensating for or knowing about some of Layer's shortcomings, it works. But for the record: it's a work-in-progress.

COPYRIGHT & LICENSE

This module is part of Wrangler. Please refer to the main module for further information and licensing / usage terms.