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.
23 lines
658 B
23 lines
658 B
#pragma once
|
|
|
|
#include "src/kernel/fs.h"
|
|
#include "src/kernel/stream.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_node(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);
|
|
|
|
stream_t *path_open_stream(const fs_node_t *root, const path_t *source, const char *path);
|
|
|
|
void path_close(path_t *path);
|
|
|