Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 43 lines (31 sloc) 1.439 kb
6dca4ac @mitsuhiko Basic resource loading
authored
1 /* utilities for path manipulation */
2 #ifndef _INC_SC_PATH_H_
3 #define _INC_SC_PATH_H_
4
5 #include "sc_boot.h"
6
cd36195 @mitsuhiko Added frame limiting and gametime
authored
7 /* returns the path to the resource folder */
6dca4ac @mitsuhiko Basic resource loading
authored
8 const char *sc_get_resource_path(void);
cd36195 @mitsuhiko Added frame limiting and gametime
authored
9
0ee8b3e @mitsuhiko Added method to create folders automatically
authored
10 /* return the path to the home folder */
11 const char *sc_get_home_path(void);
12
13 /* returns the path to the game configuration directory. This does
14 not create the directory however. */
15 const char *sc_get_settings_path(void);
16
0ea9897 @mitsuhiko Started work on new shader interface
authored
17 /* joins two paths */
18 char *sc_path_join(const char *a, const char *b);
19
20 /* returns the directory name of a path */
21 char *sc_path_dirname(const char *path);
22
23 /* joins the directory of the given path with another path */
24 char *sc_path_join_with_dir(const char *a, const char *b);
25
cd36195 @mitsuhiko Added frame limiting and gametime
authored
26 /* returns the path to a specific resource of a specific kind.
27 The kind corresponds to the folder the resource is located in.
28 If subfolders are used, slashes must be used to access a
29 resource therein. The return value must be sc_free()ed */
6dca4ac @mitsuhiko Basic resource loading
authored
30 char *sc_path_to_resource(const char *kind, const char *resource);
31
c8766c7 @mitsuhiko Added support for ini file reading and writing
authored
32 /* deletes a file. Sets SC_EIO if that is not possible and returns 0.
33 If the file wasn't there in the first place or it was deleted
34 properly, 1 is returned. */
35 int sc_path_delete_file(const char *path);
36
0ee8b3e @mitsuhiko Added method to create folders automatically
authored
37 /* creates all necessary directories up to path. If all already
38 existed or it succeeded, 1 is returned. Otherwise SC_EIO is set
39 and 0 is returned. */
40 int sc_path_makedirs(const char *path);
41
6dca4ac @mitsuhiko Basic resource loading
authored
42 #endif
Something went wrong with that request. Please try again.