++ed by:
KRAUTCAT TOBYINK MARIOROY PAWAPAWA KES
17 non-PAUSE users
Author image Dmitry Karasik

NAME

Prima::sys::FS - unicode-aware core file functions

DESCRIPTION

Since perl win32 unicode support for files is unexistent, Prima has its own parallel set of functions mimicking native functions, ie open, chdir etc. This means that files with names that cannot be converted to ANSI (ie user-preferred) codepage are not visible in perl, but the functions below mitigate that problem.

This module exports the unicode-aware functions from Prima::Utils to override the core functions. Read more in "Unicode-aware filesystem functions" in Prima::Utils.

SYNOPSIS

  use Prima::sys::FS;

  my $fn = "\x{dead}\x{beef};
  if ( _f $fn ) {
     open F, ">", $fn or die $!;
     close F;
  }
  print "ls: ", getdir, "\n";
  print "pwd: ", getcwd, "\n";

API

The module exports by default three groups of functions:

These are described in "API" in Prima::Utils:

  chdir chmod getcwd link mkdir open rename rmdir unlink utime
  getenv setenv stat access getdir
  opendir closedir rewinddir seekdir readdir telldir

The underscore-prefixed functions are same as the ones in "-X" in perlfunc (all are present except -T and -B ).

  _r _w _x _o _R _W _X _O _e _z _s _f _d _l _p _S _b _c _t _u _g _k _M _A _C

The functions that are implemented in the module itself:

abs_path

Same as Cwd::abs_path.

glob PATTERN

More or less same as CORE::glob or File::Glob::glob.

lstat PATH

Same as CORE::lstat

AUTHOR

Dmitry Karasik, <dmitry@karasik.eu.org>.

SEE ALSO

Prima::Utils, Win32::Unicode.