Acme-Pythonic-Functions
view release on metacpan or search on metacpan
lib/Acme/Pythonic/Functions.pm view on Meta::CPAN
=head2 File-related-Functions
=over 12
=item C<isdir($foo)>
Tests whether $foo is a directory. Python: C<os.path.isdir()>, Perl: C<-d>.
=item C<isfile($foo)>
Tests whether $foo is a plain file. Python: C<os.path.isfile()>, Perl: C<-f>. For more detailed file-testing use the other file-testing-operators described in "perldoc perlfunc", the stat()-function or the "File::stat"-module.
=item C<listdir($foo)>, C<oslistdir($foo)>
Returns a list of the filenames in the directory $foo. Directory-entries "." and ".." are left out. Python: C<os.listdir()>.
=item C<readfile($foo)>
Returns the contents of the text-file named $foo as a list. Only use on smaller files, as this can take a lot of memory. For processing larger files, use the "Tie::File"-module instead. C<readfile()> is not a Python-builtin, although Python has a fun...
=item C<writefile($foo, @bar)>
( run in 1.017 second using v1.01-cache-2.11-cpan-49f99fa48dc )