Prima::sys::FS(3)
π Prima::sys::FS(3) β unicode-aware core file functions π
This is the Prima::sys::FS(3) page from the User Contributed Perl Documentation, and it's literally about making file stuff behave with Unicode. Buckle up, bestie. π¦
πΈ NAME πΈ
Prima::sys::FS β unicode-aware core file functions. That's the name, that's the vibe, no cap. π
β¨ DESCRIPTION β¨
Okay so here's the situation: on perl win32, unicode support for files is unexistent. Not a vibe. So Prima has its own parallel set of functions mimicking the native functions, ie open, chdir etc. The whole point? Files with names that cannot be converted to ANSI (ie user-preferred) codepage are not visible in perl, but the functions below mitigate this problem. Slay. π
The module exports the unicode-aware functions from Prima::Utils to override the core functions. Read more in "Unicode-aware file system functions" in Prima::Utils.
π¦ SYNOPSIS π¦
Here's the demo, bestie β keep it exactly as written:
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. Periodt. Here's the whole roster:
The first group is 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 second group is the underscore-prefixed squad β same as the ones in -X in perlfunc. All are present except -T and -B. Here's the lineup:
_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 third group is implemented in the module itself β these cuties right here:
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>. Legend behavior. π«Ά
π SEE ALSO π
Prima::UtilsWin32::Unicode
Bye bestie! This page is Prima::sys::FS(3) from perl v5.42.0, dated 2024-08-20. Stay unicode-y. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms