
Filesys::Ext2 - Interface to ext2 and ext3 filesystem attributes

use Filesys::Ext2 qw(:all);
eval { $mode = lsattr("/etc/passwd"); }
eval { chattr("+aud", "/etc/passwd"); }
#or equivalently
#chattr($mode|0x0062, "/etc/passwd");

You may specify the path of the e2fsprogs upon use
use Filesys::Ext2 {PATH=>'/path/to/binaries'};
Otherwise the module will use the default path /usr/bin/
Change the mode of @files to match $mask. $mask may be a bitmask or symbolic mode eg;
=DIE +cad -s-i
Throws an exception upon failure.
Returns bitmasks respresenting the attributes of @files.
Throws an exception upon failure.
Same as CORE::lstat, but appends the numerical attribute bitmask.
Same as CORE::stat, but appends the numerical attribute bitmask.
Accepts a bitmask and returns the symbolic mode. In list context it returns a symbol list like lsattr, in scalar context it returns a string that matches the - region of lsattr(1) eg;
s-----A------


Ideally this would be implemented with XS, maybe someday.
The bit mappings for attributes, from other/ext2_fs.h
Secure deletion
Undelete
Compress file
Synchronous updates
Immutable file
Writes to file may only append
Do not dump file
Do not update atime
Dirty compressed data
Not user modifiable.
Access raw compressed data
Not (currently) user modifiable.
Compression error.
Not user modifiable.
btree format dir / hash-indexed directory
Not user modifiable.
File data should be journaed
File tail should not be merged
Synchronous directory modifications
Top of directory hierarchies

Jerrad Pierce <jpierce@cpan.org>