diff options
author | Max Kellermann <max@duempel.org> | 2014-01-29 18:14:57 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-05 10:04:03 +0100 |
commit | 9ae7f186bc43749383594807b1d751b5389161e7 (patch) | |
tree | 0cafbfde8316c4b1a9ded19060d3020977a604dd /src/Mapper.cxx | |
parent | f8d114be42663006d162311c1ecaf4306e0b72e4 (diff) | |
download | mpd-9ae7f186bc43749383594807b1d751b5389161e7.tar.gz mpd-9ae7f186bc43749383594807b1d751b5389161e7.tar.xz mpd-9ae7f186bc43749383594807b1d751b5389161e7.zip |
LocalStorage: new API abstracting filesystem walk
Prepare to make this a new plugin API, for example to use a SMB share
for the music_directory.
Diffstat (limited to '')
-rw-r--r-- | src/Mapper.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Mapper.cxx b/src/Mapper.cxx index 60928dbb9..786634ebb 100644 --- a/src/Mapper.cxx +++ b/src/Mapper.cxx @@ -193,7 +193,8 @@ map_uri_fs(const char *uri) return AllocatedPath::Build(music_dir_fs, uri_fs); } -AllocatedPath +gcc_pure +static AllocatedPath map_directory_fs(const Directory &directory) { assert(!music_dir_fs.IsNull()); @@ -204,7 +205,15 @@ map_directory_fs(const Directory &directory) return map_uri_fs(directory.GetPath()); } -AllocatedPath +/** + * Determines the file system path of a directory's child (may be a + * sub directory or a song). + * + * @param directory the parent directory object + * @param name the child's name in UTF-8 + * @return the path in file system encoding, or nullptr if mapping failed + */ +static AllocatedPath map_directory_child_fs(const Directory &directory, const char *name) { assert(!music_dir_fs.IsNull()); |