#include <stdio.h>
#include <sys/stat.h>
+#include "cpp-common/bt2s/make-unique.hpp"
#include "cpp-common/vendor/fmt/format.h"
#include "file.hpp"
-void ctf_fs_file_destroy(struct ctf_fs_file *file)
-{
- if (!file) {
- return;
- }
-
- delete file;
-}
-
-void ctf_fs_file_deleter::operator()(ctf_fs_file * const file) noexcept
-{
- ctf_fs_file_destroy(file);
-}
-
ctf_fs_file::UP ctf_fs_file_create(const bt2c::Logger& parentLogger)
{
- return ctf_fs_file::UP {new ctf_fs_file {parentLogger}};
+ return bt2s::make_unique<ctf_fs_file>(parentLogger);
}
int ctf_fs_file_open(struct ctf_fs_file *file, const char *mode)