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:
parent
aa757172c6
commit
bbe0fe1fb6
@ -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) = @_;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user