A toy operating system written in C.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
freywaros/src/kernel/path.h

19 lines
464 B

#pragma once
#include "src/kernel/fs.h"
#include <stdint.h>
#define PATH_DEPTH 255
typedef struct {
fs_node_t *stack[PATH_DEPTH];
uint8_t depth;
} path_t;
path_t *path_open(const fs_node_t *root, const path_t *source, const char *path);
fs_node_t *path_open_file(const fs_node_t *root, const path_t *source, const char *path);
fs_node_t *path_open_directory(const fs_node_t *root, const path_t *source, const char *path);
void path_close(path_t *path);