App-Followme

 view release on metacpan or  search on metacpan

lib/App/Followme/FIO.pm  view on Meta::CPAN

=item $date_string = fio_format_date($date, $format);

Convert a date to a new format. If the format is omitted, the ISO format is used.

=item $filename = fio_full_file_name(@path);

Construct a filename from a list of path components.

=item $date = $date = fio_get_date($filename);

Get the modification date of a file as seconds since 1970 (Unix standard.)

=item $size =fio_get_size($filename);

Get the size of a file in bytes.

=item $globbed_patterns = fio_glob_patterns($pattern);

Convert a comma separated list of Unix style filename patterns into a reference
to an array of Perl regular expressions.

item $test = fio_is_newer($target, @sources);

Compare the modification date of the target file to the modification dates of
the source files. If the target file is newer than all of the sources, return
1 (true).

=item $filename = fio_make_dir($filename);

lib/App/Followme/FIO.pm  view on Meta::CPAN


=item $flag = fio_match_patterns($filename, $patterns);

Return 1 (Perl true) if a filename matches a Perl pattern in a list of
patterns.

=item $filename = fio_most_recent_file($directory, $patterns, $exclude_index);


Return the most recently modified file in a directory whose name matches
a comma separated list of Unix wildcard patterns. Exclude the index if 
the last argument is true.

=item $str = fio_read_page($filename, $binmode);

Read a file into a string. An the entire file is read from a string, there is no
line at a time IO. This is because files are typically small and the parsing
done is not line oriented. Binmode is an optional parameter that indicates file
type if it is not a plain text file.

=item fio_set_date($filename, $date);

lib/App/Followme/UploadFtp.pm  view on Meta::CPAN

#----------------------------------------------------------------------
# Read the default parameter values

sub parameters {
    my ($pkg) = @_;

    return (
            ftp_url => '',
            remote_directory => '',
            ftp_debug => 0,
            remote_pkg => 'File::Spec::Unix',
           );
}

#----------------------------------------------------------------------
# Add a directory to the remote site

sub add_directory {
    my ($self, $dir) = @_;

    my $status;

lib/App/Followme/UploadFtp.pm  view on Meta::CPAN


The top directory of the remote site

=item ftp_url

The url of the remote ftp site.

=item remote_pkg

The name of the package that manipulates filenames for the remote system. The
default value is 'File::Spec::Unix'. Other possible values are
'File::Spec::Win32' and 'File::Spec::VMS'. Consult the Perl documentation for
more information.

=back

=head1 LICENSE

Copyright (C) Bernie Simon.

This library is free software; you can redistribute it and/or modify

t/UploadFtp.t  view on Meta::CPAN

my $test_dir = catdir(@path, 'test');

rmtree($test_dir, 0, 1) if -e $test_dir;
mkdir($test_dir) unless -e $test_dir;
 
chdir $test_dir or die $!;


my %configuration = (
                     top_directory => $test_dir,
                     remote_pkg => 'File::Spec::Unix',
                    );

#----------------------------------------------------------------------
# Test

SKIP: {
    # Site specific configuration

    my $user = '';
    my $password = '';



( run in 1.297 second using v1.01-cache-2.11-cpan-64ef6c95b5d )