Virtual filesystem. More...
#include "stdinc.h"#include "config.h"#include "vfs.h"#include "vfs_modules.h"

Go to the source code of this file.
Data Structures | |
| struct | vfswriter |
| Playlist writing module object. Matching is performed by extension. More... | |
Defines | |
| #define | NUM_MODULES (sizeof modules / sizeof(struct vfsmodule)) |
| The number of virtual file system modules currently available in the application. | |
| #define | NUM_WRITERS (sizeof writers / sizeof(struct vfswriter)) |
| The number of VFS writing modules currently available in the application. | |
Functions | |
| static char * | vfs_path_concat (const char *dir, const char *file, int strict) |
| Concatenate a path- and filename. The resulting filename will not contain /./'s and /../'s. | |
| const char * | vfs_lockup (void) |
| Try to lock the application in a specified directory on startup. This function returns an error message. | |
| static void | vfs_dealloc (struct vfsent *ve) |
| Deallocates the data structures for a VFS entity. | |
| struct vfsref * | vfs_lookup (const char *filename, const char *name, const char *basepath, int strict) |
| Create a VFS reference from a filename. The name argument is optional. It only allows you to display entities with a different name (inside playlists). When setting the basepath variable, all relative pathnames are appended to the basepath. When unset, it can only open absolute filenames. When forcing strict pathnames, application-implemented features like ~ are discarded. | |
| struct vfsref * | vfs_dup (const struct vfsref *vr) |
| Duplicate the reference by increasing the reference count. | |
| void | vfs_close (struct vfsref *vr) |
| Decrease the reference count of the entity and deallocate the entity when no references are left. The reference itself is also deallocated. | |
| int | vfs_populate (const struct vfsref *vr) |
| Populate the VFS entity with references to its children. | |
| void | vfs_unfold (struct vfslist *vl, const struct vfsref *vr) |
| Recursively expand a VFS reference to all their usable children and append them to the specified list. | |
| void | vfs_locate (struct vfslist *vl, const struct vfsref *vr, const struct vfsmatch *vm) |
| Recursively search through a VFS reference and add all matching objects to a list. The VFS reference itself will be excluded from the results. | |
| struct vfsref * | vfs_write_playlist (const struct vfslist *vl, const struct vfsref *vr, const char *filename) |
| Write a VFS list to a PLS file on disk. | |
| int | vfs_delete (const char *filename) |
| Delete a local file. Use with caution. ;-). | |
| FILE * | vfs_fopen (const char *filename, const char *mode) |
| fopen()-like routine that uses VFS path expansion. | |
| int | vfs_fgets (char *str, size_t size, FILE *fp) |
| fgets()-like routine that performs newline-stripping. | |
| struct vfsmatch * | vfs_match_new (const char *str) |
| Compile a regular expression for matching. | |
| void | vfs_match_free (struct vfsmatch *vm) |
| Deallocate a compiled regular expression. | |
Variables | |
| static struct vfsmodule | modules [] |
| List of available virtual filesystem modules and their options and functions. | |
| static struct vfswriter | writers [] |
| List of VFS writing modules. The first item in the list is used when no matching extension was found. In that case, the extension of the first item will be appended to the filename. | |
Virtual filesystem.
Definition in file vfs.c.
1.6.3