1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:47:46 +00:00

FileManager: Add a delete_path helper for singular paths

This is just the syscalls and error handling that was done for each
file in delete_paths.

This will be used to prevent the unneeded construction of vectors
when performing cut operations
This commit is contained in:
Idan Horowitz 2020-12-28 17:29:25 +02:00 committed by Andreas Kling
parent f30d4f22ef
commit 7450f20b81
2 changed files with 31 additions and 28 deletions

View file

@ -33,6 +33,7 @@
namespace FileUtils {
void delete_path(const String&, GUI::Window*);
void delete_paths(const Vector<String>&, bool should_confirm, GUI::Window*);
int delete_directory(String directory, String& file_that_caused_error);
bool copy_file_or_directory(const String& src_path, const String& dst_path);