MPD: lib/nfs/Base.hxx File Reference

MPD 0.20.18

Functions
Base.hxx File Reference
`#include "check.h"`
`#include "Compiler.h"`
Include dependency graph for Base.hxx:

Go to the source code of this file.

## Functions
void | nfs_set_base (const char *server, const char *export_name)
| Set the "base" NFS server and export name. More...
gcc_pure const char * | nfs_check_base (const char *server, const char *path) noexcept
| Check if the given server and path are inside the "base" server/export_name. More...

## Function Documentation

## ◆ nfs_check_base()

gcc_pure const char* nfs_check_base | ( | const char * | server,
|  | const char * | path
| ) |  |
| noexcept

Check if the given server and path are inside the "base" server/export_name.

If yes, then a pointer to the portion of "path" after the export_name is returned; otherwise, nullptr is returned.

## ◆ nfs_set_base()

void nfs_set_base | ( | const char * | server,
|  | const char * | export_name
| ) |  |

Set the "base" NFS server and export name.

This will be the default export that will be mounted if a file within this export is being opened, instead of guessing the mount point.

This is a kludge that is not truly thread-safe.