LMMS
Loading...
Searching...
No Matches
filesystem.h
Go to the documentation of this file.
1/*
2 Copyright 2007-2020 David Robillard <d@drobilla.net>
3
4 Permission to use, copy, modify, and/or distribute this software for any
5 purpose with or without fee is hereby granted, provided that the above
6 copyright notice and this permission notice appear in all copies.
7
8 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
17#include <stdbool.h>
18#include <stdio.h>
19
21char*
23
25bool
26lilv_path_is_absolute(const char* path);
27
29bool
30lilv_path_is_child(const char* path, const char* dir);
31
33char*
35
42char*
43lilv_path_absolute(const char* path);
44
51char*
52lilv_path_absolute_child(const char* path, const char* parent);
53
61char*
62lilv_path_relative_to(const char* path, const char* base);
63
69char*
70lilv_path_parent(const char* path);
71
77char*
78lilv_path_filename(const char* path);
79
81char*
82lilv_path_join(const char* a, const char* b);
83
90char*
91lilv_path_canonical(const char* path);
92
94bool
95lilv_path_exists(const char* path);
96
98bool
99lilv_is_directory(const char* path);
100
106int
107lilv_copy_file(const char* src, const char* dst);
108
114int
115lilv_symlink(const char* oldpath, const char* newpath);
116
129int
130lilv_flock(FILE* file, bool lock, bool block);
131
143void
144lilv_dir_for_each(const char* path,
145 void* data,
146 void (*f)(const char* path, const char* name, void* data));
147
156char*
157lilv_create_temporary_directory_in(const char* pattern, const char* parent);
158
165char*
167
173int
174lilv_create_directories(const char* dir_path);
175
177int
178lilv_remove(const char* path);
179
181bool
182lilv_file_equals(const char* a_path, const char* b_path);
uint8_t a
Definition Spc_Cpu.h:141
unsigned f
Definition inflate.c:1572
char * lilv_path_canonical(const char *path)
Definition filesystem.c:283
char * lilv_path_current(void)
Return the current working directory.
Definition filesystem.c:119
char * lilv_create_temporary_directory(const char *pattern)
Definition filesystem.c:464
char * lilv_path_absolute_child(const char *path, const char *parent)
Definition filesystem.c:138
char * lilv_path_parent(const char *path)
Definition filesystem.c:198
char * lilv_temp_directory_path(void)
Return the path to a directory suitable for making temporary files.
Definition filesystem.c:73
bool lilv_path_is_absolute(const char *path)
Return true iff path is an absolute path.
Definition filesystem.c:92
int lilv_create_directories(const char *dir_path)
Definition filesystem.c:475
char * lilv_path_relative_to(const char *path, const char *base)
Definition filesystem.c:148
int lilv_flock(FILE *file, bool lock, bool block)
Definition filesystem.c:375
bool lilv_is_directory(const char *path)
Return true iff path points to an existing directory.
Definition filesystem.c:311
char * lilv_path_absolute(const char *path)
Definition filesystem.c:125
void lilv_dir_for_each(const char *path, void *data, void(*f)(const char *path, const char *name, void *data))
Definition filesystem.c:398
int lilv_copy_file(const char *src, const char *dst)
Definition filesystem.c:318
int lilv_remove(const char *path)
Remove the file or empty directory at path.
Definition filesystem.c:514
bool lilv_path_is_child(const char *path, const char *dir)
Return true iff path is a child of dir.
Definition filesystem.c:108
char * lilv_path_join(const char *a, const char *b)
Join path a and path b with a single directory separator between them.
Definition filesystem.c:248
char * lilv_create_temporary_directory_in(const char *pattern, const char *parent)
Definition filesystem.c:429
bool lilv_file_equals(const char *a_path, const char *b_path)
Return true iff the given paths point to files with identical contents.
Definition filesystem.c:526
bool lilv_path_exists(const char *path)
Return true iff path points to an existing file system entry.
Definition filesystem.c:300
int lilv_symlink(const char *oldpath, const char *newpath)
Definition filesystem.c:357
char * lilv_path_filename(const char *path)
Definition filesystem.c:226
static const char * name
Definition pugl.h:1582
static uintptr_t parent
Definition pugl.h:1644
JSAMPIMAGE data
Definition jpeglib.h:945
b
Definition crypt.c:628
int * pattern
Definition match.c:126
struct zdirent * file
Definition win32.c:1500