mirror of
https://git.proxmox.com/git/pve-common
synced 2025-04-29 01:30:14 +00:00
backport file_copy from PVE4
This commit is contained in:
parent
aa757172c6
commit
bbe0fe1fb6
@ -38,6 +38,7 @@ template_replace
|
|||||||
safe_print
|
safe_print
|
||||||
trim
|
trim
|
||||||
extract_param
|
extract_param
|
||||||
|
file_copy
|
||||||
);
|
);
|
||||||
|
|
||||||
my $pvelogdir = "/var/log/pve";
|
my $pvelogdir = "/var/log/pve";
|
||||||
@ -213,6 +214,12 @@ sub file_get_contents {
|
|||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub file_copy {
|
||||||
|
my ($filename, $dst, $max, $perm) = @_;
|
||||||
|
|
||||||
|
file_set_contents ($dst, file_get_contents($filename, $max), $perm);
|
||||||
|
}
|
||||||
|
|
||||||
sub file_read_firstline {
|
sub file_read_firstline {
|
||||||
my ($filename) = @_;
|
my ($filename) = @_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user