1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

FileManager: Don't close() twice when copying a file

This commit is contained in:
Andreas Kling 2020-08-17 11:30:30 +02:00
parent 0fecdb7904
commit a27d782dd6
2 changed files with 14 additions and 15 deletions

View file

@ -27,6 +27,7 @@
#pragma once
#include <AK/String.h>
#include <LibCore/Forward.h>
#include <sys/stat.h>
namespace FileUtils {
@ -34,7 +35,7 @@ namespace FileUtils {
int delete_directory(String directory, String& file_that_caused_error);
bool copy_file_or_directory(const String& src_path, const String& dst_path);
String get_duplicate_name(const String& path, int duplicate_count);
bool copy_file(const String& src_path, const String& dst_path, const struct stat& src_stat, int src_fd);
bool copy_file(const String& dst_path, const struct stat& src_stat, Core::File&);
bool copy_directory(const String& src_path, const String& dst_path, const struct stat& src_stat);
}