use Win32::File;
$name="Test.txt";
$attr=0;
Win32::File::GetAttributes($name,$attr) or die "Can't get attributes for $name.";
print "File attributes:$attr\n";
if($attr & READONLY)
{
print "$name is read only.\n";
}
Win32::File::SetAttributes($name,ARCHIVE|READONLY);
Perl获取和修改文件属性
最新推荐文章于 2021-11-11 11:14:05 发布