htils
1
A small set of utilities for C programming.
Toggle main menu visibility
Loading...
Searching...
No Matches
path.h
Go to the documentation of this file.
1
#ifndef HTILS_PATH_H
2
#define HTILS_PATH_H
3
4
/***********************************/
5
6
#include <
htils/arena.h
>
7
#include <
htils/basictypes.h
>
8
#include <
htils/string.h
>
9
10
/***********************************/
11
30
string
*
path_canonical
(
arena_t
*
arena
,
const
string
*path);
31
32
//
33
//
34
//
35
52
string
*
path_basename
(
arena_t
*
arena
,
const
string
*path);
53
54
//
55
//
56
//
57
73
string
*
path_dirname
(
arena_t
*
arena
,
const
string
*path);
74
75
//
76
//
77
//
78
94
string
*
path_extension
(
arena_t
*
arena
,
const
string
*path);
95
96
//
97
//
98
//
99
116
string
*
path_stem
(
arena_t
*
arena
,
const
string
*path);
117
118
//
119
//
120
//
121
136
string
*
path_join
(
arena_t
*
arena
,
const
string
*first,
const
string
*second);
137
138
//
139
//
140
//
141
164
b32
make_dir
(
const
string
*path);
165
166
//
167
//
168
//
169
193
b32
does_path_exist
(
const
string
*path);
194
195
//
196
//
197
//
198
222
b32
path_remove
(
const
string
*path);
223
224
#endif
// !HTILS_PATH_H
arena.h
arena_t
struct arena arena_t
An atomic arena.
basictypes.h
b32
u32 b32
Definition
basictypes.h:43
path_remove
b32 path_remove(const string *path)
Removes a file or directory at path.
Definition
path.c:264
path_basename
string * path_basename(arena_t *arena, const string *path)
Gets the final component of path: the file name, or the last directory.
Definition
path.c:66
path_join
string * path_join(arena_t *arena, const string *first, const string *second)
Joins two paths together.
Definition
path.c:194
does_path_exist
b32 does_path_exist(const string *path)
Checks if a path exists.
Definition
path.c:248
path_extension
string * path_extension(arena_t *arena, const string *path)
Get the extension of path.
Definition
path.c:125
path_canonical
string * path_canonical(arena_t *arena, const string *path)
Gets the absolute/canonical path of path.
Definition
path.c:42
path_stem
string * path_stem(arena_t *arena, const string *path)
Get the stem of path.
Definition
path.c:158
make_dir
b32 make_dir(const string *path)
Makes a directory.
Definition
path.c:232
path_dirname
string * path_dirname(arena_t *arena, const string *path)
Get the dirname of a path.
Definition
path.c:87
string.h
arena
An atomic arena.
Definition
arena.h:45
include
htils
path.h
Generated by
1.17.0