|
LMMS
|
#include <ctype.h>#include <errno.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <stddef.h>#include <dirent.h>#include <limits.h>#include <unistd.h>#include <sys/stat.h>#include <sys/types.h>#include "lilv_internal.h"Classes | |
| struct | Latest |
Macros | |
| #define | _POSIX_C_SOURCE 200809L /* for fileno */ |
| #define | _BSD_SOURCE 1 /* for realpath, symlink */ |
| #define | _DEFAULT_SOURCE 1 /* for realpath, symlink */ |
| #define | PAGE_SIZE 4096 |
Functions | |
| void | lilv_free (void *ptr) |
| char * | lilv_strjoin (const char *first,...) |
| char * | lilv_strdup (const char *str) |
| const char * | lilv_uri_to_path (const char *uri) |
| char * | lilv_file_uri_parse (const char *uri, char **hostname) |
| char * | lilv_get_lang (void) |
| static char * | strappend (char *dst, size_t *dst_len, const char *suffix, size_t suffix_len) |
| static char * | append_var (char *dst, size_t *dst_len, const char *var) |
| char * | lilv_expand (const char *path) |
| static bool | lilv_is_dir_sep (const char c) |
| char * | lilv_dirname (const char *path) |
| bool | lilv_path_exists (const char *path, void *ignored) |
| char * | lilv_find_free_path (const char *in_path, bool(*exists)(const char *, void *), void *user_data) |
| int | lilv_copy_file (const char *src, const char *dst) |
| bool | lilv_path_is_absolute (const char *path) |
| Return true iff path is an absolute path. | |
| char * | lilv_path_absolute (const char *path) |
| char * | lilv_path_join (const char *a, const char *b) |
| Join path a and path b with a single directory separator between them. | |
| static void | update_latest (const char *path, const char *name, void *data) |
| char * | lilv_get_latest_copy (const char *path, const char *copy_path) |
| char * | lilv_realpath (const char *path) |
| int | lilv_symlink (const char *oldpath, const char *newpath) |
| char * | lilv_path_relative_to (const char *path, const char *base) |
| bool | lilv_path_is_child (const char *path, const char *dir) |
| Return true iff path is a child of dir. | |
| int | lilv_flock (FILE *file, bool lock) |
| void | lilv_dir_for_each (const char *path, void *data, void(*f)(const char *path, const char *name, void *data)) |
| int | lilv_mkdir_p (const char *dir_path) |
| static off_t | lilv_file_size (const char *path) |
| bool | lilv_file_equals (const char *a_path, const char *b_path) |
| Return true iff the given paths point to files with identical contents. | |
| #define _BSD_SOURCE 1 /* for realpath, symlink */ |
| #define _DEFAULT_SOURCE 1 /* for realpath, symlink */ |
| #define _POSIX_C_SOURCE 200809L /* for fileno */ |
| #define PAGE_SIZE 4096 |
|
static |
Append the value of the environment variable var to dst.
Copy the file at path src to path dst.
| void lilv_dir_for_each | ( | const char * | path, |
| void * | data, | ||
| void(* | f )(const char *path, const char *name, void *data) ) |
Visit every file in the directory at path.
| char * lilv_dirname | ( | const char * | path | ) |
| char * lilv_expand | ( | const char * | path | ) |
Expand variables (e.g. POSIX ~ or $FOO, Windows FOO%) in path.
Return true iff the given paths point to files with identical contents.
| char * lilv_find_free_path | ( | const char * | in_path, |
| bool(* | exists )(const char *, void *), | ||
| void * | user_data ) |
| int lilv_flock | ( | FILE * | file, |
| bool | lock ) |
| char * lilv_get_lang | ( | void | ) |
Return the current LANG converted to Turtle (i.e. RFC3066) style. For example, if LANG is set to "en_CA.utf-8", this returns "en-ca".
Return the latest copy of the file at path that is newer.
|
static |
| char * lilv_path_absolute | ( | const char * | path | ) |
Return path as an absolute path.
If path is absolute, an identical copy of it is returned. Otherwise, the returned path is relative to the current working directory.
| bool lilv_path_is_absolute | ( | const char * | path | ) |
Return true iff path is an absolute path.
Return true iff path is a child of dir.
Return path relative to base if possible.
If path is not within base, a copy is returned. Otherwise, an equivalent path relative to base is returned (which may contain up-references).
| char * lilv_realpath | ( | const char * | path | ) |
| char * lilv_strdup | ( | const char * | str | ) |
| char * lilv_strjoin | ( | const char * | first, |
| ... ) |
Create a symlink at newpath that points to oldpath.
|
static |
Append suffix to dst, update dst_len, and return the realloc'd result.