Wrangler
view release on metacpan or search on metacpan
lib/Wrangler/FileSystem/Layers.pm view on Meta::CPAN
tif => ['Tagged Image File Format Image', 'image/tiff'], # image/tiff, image/tiff-fx
tga => ['Targa Image File', 'image/targa'], # image/x-targa, image/x-tga
tgz => 'tar/gzip Archive',
thm => ['Canon Thumbnail Image', 'image/jpeg'],
tpic => ['Targa Image File', 'image/targa'], # image/x-targa, image/x-tga
ts => ['MPEG-2 Transport Stream', 'video/mp2ts'], # http://www.ietf.org/mail-archive/web/ietf-types/current/msg01593.html
txt => 'Text Document',
veg => ['Sony Vegas Project File', 'application/vegas80'], # application/vegas81, application/vegas90, ...
vcf => 'vCard File',
vff => 'Sun TAAC Image',
vob => ['DVD Video File', 'video/dvd'],
wav => ['Waveform Audio File Format File', 'audio/wav'], # audio/vnd.wave, audio/wave
webm => ['WebM Audio-/Video File', 'video/webm'], # also audio/webm
webp => ['WebP Image', 'image/webp'],
wcl => ['Wrangler Column Layout', 'application/json'], # exported/imported by Settings::Filebrowser, is application/json
wfl => ['Wrangler Field Layout', 'application/json'], # exported/imported by FormEditor, is application/json
wma => ['Windows Media Audio', 'audio/ms-wma'],
wmv => ['Windows Media Video', 'audio/ms-wmv'],
xbm => 'X Bitmap File',
xmp => ['Extensible Metadata Platform File', 'application/rdf+xml'],
xcf => 'GIMP Image',
xls => 'Microsoft Excel Spreadsheets',
xlsm => 'Office Open XML Spreadsheets',
xlsx => 'Office Open XML Spreadsheets',
yaml => 'YAML Markup File',
zip => 'zip Archive',
);
1;
__END__
=pod
=head1 NAME
Wrangler::FileSystem::Layers - Filesystem abstraction for Wrangler
=head1 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.
=head1 COPYRIGHT & LICENSE
This module is part of L<Wrangler>. Please refer to the main module for further
information and licensing / usage terms.
( run in 1.064 second using v1.01-cache-2.11-cpan-98e64b0badf )