Check that a file / directory exists and is readable
Other
Switch branches/tags
Nothing to show
Latest commit 7de89dd Apr 22, 2017 @atweiden committed on GitHub Merge pull request #2 from samcv/license-SPDX
Use SPDX identifier in license field of META6.json
Permalink
Failed to load latest commit information.
lib/File s/returns/--> Mar 29, 2017
t harmonize vimsig Aug 23, 2016
.travis.yml tab width 4 .travis.yml Aug 14, 2016
META6.json
README.md 0.0.2: return more permissions in shortflag form Aug 17, 2016
UNLICENSE Initial import Jul 1, 2016

README.md

File::Presence

Check that a file or directory exists and is readable.

Synopsis

use File::Presence;

my $config-dir = '~/.config';
my $config-file = 'bzzt';

say exists-readable-dir($config-dir)
    ?? 'readable dir exists'
    !! 'readable dir dne';

say exists-readable-file($config-file)
    ?? 'readable file exists'
    !! 'readable file dne';

say File::Presence.show($config-dir); # { :e, :d, :!f, :r, :w, :x }
say File::Presence.show($config-file); # { :e, :!d, :f, :r, :w, :!x }

Installation

Dependencies

  • Rakudo Perl6

Licensing

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.