NAME
Win32::Unicode - perl unicode-friendly wrapper for win32api.
SYNOPSIS
use utf8;
use Win32::Unicode;
# unicode console out
printW "I \x{2665} Perl";
# unicode file util
unlinkW $file or die $!;
copyW $from, $to or die $!;
moveW $from, $to or die $!;
file_type f => $file ? 'ok' : 'no file';
my $size = file_size $file;
touchW $new_file;
my @stat = statW $file;
# unicode directory util
mkdirW $dir or die $!;
rmdirW $dir or die $!;
my $cwd = getcwdW;
chdirW $change_dir;
findW sub { sayW $_ }, $dir;
finddepthW sub { sayW $_ }, $dir;
mkpathW $long_path_dir_name;
rmtreeW $tree;
cptreeW $from, $to
mvtreeW $from, $to;
my $dir_size = dir_size $dir;
my @file_list = file_list $dir;
my @dir_list = dir_list $dir;
# opendir
my $wdir = Win32::Unicode::Dir->new;
$wdir->open($dir) or die $!;
for ($wdir->fetch) {
next if /^\.{1,2}$/;
my $full_path = "$dir/$_";
if (file_type('f', $full_path)) {
# $_ is file
}
elsif (file_type('d', $full_path))
# $_ is directory
}
}
$wdir->close or die $!;
DESCRIPTION
Wn32::Unicode is a perl unicode-friendly wrapper for win32api. This module many functions import :P.
Many features easy to use Perl because I think it looks identical to the standard function.
OPTION
Switch Win32::Unicode::Native.
use Win32::Unicode '-native'; # eq use Win32::Unicode::Native
AUTHOR
Yuji Shimada <xaicron@cpan.org>
SEE ALSO
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.