|
NAMEGtk2::Chmod - Provides a dialog for getting values to use with chmod.VERSIONVersion 0.0.0SYNOPSISuse Gtk2; use Gtk2::Chmod; Gtk2->init; my %returned=Gtk2::Chmod->ask('/etc/passwd'); if($returned{error}){ print "Error!\n".$returned{errorString}."\n"; }else{ use Data::Dumper; print Dumper(\%returned); } METHODSaskThis creates a dialog that provides a dialog for getting what mode should be used for a file/directory when doing chmod.The data is returned as a hash The initial settings are based off of the file/direcotry specified. my %returned=Gtk2::Chmod->ask($item); if($returned{error}){ print "Error!\n".$returned{errorString}."\n"; }else{ use Data::Dumper; print Dumper(\%returned); if($returned{pressed} eq 'ok'){ if(-d $item){ chmod($returned{dirmode}, $item); }else{ chmod($returned{filemode}, $item); } } } RETURNED HASHerrorThis is defined if there is a error and the integer is the error code.errorStringThis provides a desciption of the current error.pressedIf this is set to 'ok' the user has accepted the values.urSet to '1' if the user has read permissions.uwSet to '1' if the user has write permissions.uxSet to '1' if the user has execute/search permissions.suidSet to '1' if the user has suid permissions.grSet to '1' if the group has read permissions.gwSet to '1' if the group has write permissions.sgidSet to '1' if the group has sgid permissions.oxSet to '1' if the group has group permissions.orSet to '1' if the other has read permissions.owSet to '1' if the other has write permissions.oxSet to '1' if the other has group permissions.ERROR CODESTo check if a error is set, check $returned{error}. A more verbose description of the returned error can be found in $returned{errorString};1The file/directory does not exist.AUTHORZane C. Bowers, "<vvelox at vvelox.net>"BUGSPlease report any bugs or feature requests to "bug-gtk2-chmod at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Gtk2-Chmod>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORTYou can find documentation for this module with the perldoc command.perldoc Gtk2::Chmod You can also look for information at:
ACKNOWLEDGEMENTSCOPYRIGHT & LICENSECopyright 2009 Zane C. Bowers, all rights reserved.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |