
CatalystX::Usul::FileSystem - File system related methods

0.7.$Revision: 1181 $

package CatalystX::Usul::Model::FileSystem;
use CatalystX::Usul::FileSystem;
1;
package YourApp::Model::FileSystem;
use base qw(CatalystX::Usul::Model::FileSystem);
1;
package YourApp::Controller::Foo;
sub bar {
my ($self, $c) = @_;
$c->model( q(FileSystem) )->list_subdirectory( { dir => q(/path) } );
return;
}

This model provides methods for manipulating files and directories

Constructor defines logsdir; the location of the applications log files and no_thrash; the length of time to wait between test for the existence of a file to avoid a spin loop
Archives a file by prepending the $self-postfix>, which defaults to A_
Uses the system fuser command if it is available to determine if a file is in use
Parses the output from the system mount command to produce a list of file systems
Returns the -rw-rw-r-- style permission string for a given octal mode
Generates the table data for a directory listing. The data is used by the table subclass of HTML::FormWidgets
Archive old files and delete even older ones from a given directory
Issues a sequence a move commands to rename file to file.0, file.0 to file.1, file.1 to file.2 and so on
Calls "rotate". Will also touch a new logfile into existence and optionally signal a process
Calls "rotate_log" on all of the .log files in the given directory, which defaults to the logs directory
Reverse out the effect of calling "archive"
Wait for a given file to exist. Polls at given intervals file a configurable period before throwing a time out error if the file does not show up

None

None


There are no known incompatibilities in this module

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Peter Flanigan, <Support at RoxSoft.co.uk>

Copyright (c) 2011 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE