io: implement path manipulation and directory iteration on darwin

This commit is contained in:
2025-02-13 18:03:09 +00:00
parent 8862cdf2e0
commit c822be0804
6 changed files with 419 additions and 15 deletions

View File

@@ -1,7 +1,8 @@
#include <CuTest.h>
#include <blue/core/stringstream.h>
#include <blue/io/path.h>
#include <blue/object/object.h>
#include <blue/core/stringstream.h>
#include <stdio.h>
void test_path_1(CuTest *tc)
{
@@ -17,9 +18,9 @@ void test_path_1(CuTest *tc)
b_path *path2 = b_path_create_from_cstr("path1\\path2\\");
b_path *path3 = b_path_create_from_cstr("path3\\path4\\");
b_path *paths[] = {path, path2, path3};
const b_path *paths[] = {path, path2, path3};
b_path *path4 = b_path_join(paths, sizeof paths / sizeof *paths);
b_path *path4 = b_path_join(paths, sizeof paths / sizeof paths[0]);
b_stringstream_begin(&str, buf, sizeof buf);
b_to_string(B_OBJECT(path4), &str);