5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-03-11 20:58:41 +03:00

backport file_copy from PVE4

This commit is contained in:
Wolfgang Bumiller 2016-08-16 16:31:11 +02:00 committed by Fabian Grünbichler
parent aa757172c6
commit bbe0fe1fb6

View File

@ -38,6 +38,7 @@ template_replace
safe_print
trim
extract_param
file_copy
);
my $pvelogdir = "/var/log/pve";
@ -213,6 +214,12 @@ sub file_get_contents {
return $content;
}
sub file_copy {
my ($filename, $dst, $max, $perm) = @_;
file_set_contents ($dst, file_get_contents($filename, $max), $perm);
}
sub file_read_firstline {
my ($filename) = @_;