fs/{StandardDirectory,CheckFile}: move to fs/glue/

Distangle library dependencies.
This commit is contained in:
Max Kellermann 2023-03-06 19:36:34 +01:00
parent c937a299f7
commit b5d224ce22
16 changed files with 39 additions and 26 deletions

View File

@ -425,6 +425,7 @@ subdir('src/lib/crypto')
subdir('src/zeroconf')
subdir('src/fs')
subdir('src/fs/glue')
subdir('src/config')
subdir('src/tag')
subdir('src/neighbor')

View File

@ -20,7 +20,7 @@
#include "fs/NarrowPath.hxx"
#include "fs/Traits.hxx"
#include "fs/FileSystem.hxx"
#include "fs/StandardDirectory.hxx"
#include "fs/glue/StandardDirectory.hxx"
#include "event/Features.h"
#include "io/uring/Features.h"
#include "cmdline/OptionDef.hxx"

View File

@ -17,7 +17,7 @@
#include "net/SocketUtil.hxx"
#include "system/Error.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/StandardDirectory.hxx"
#include "fs/glue/StandardDirectory.hxx"
#include "fs/XDG.hxx"
#include "util/Domain.hxx"

View File

@ -8,7 +8,7 @@
#include "config.h"
#include "Mapper.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/CheckFile.hxx"
#include "fs/glue/CheckFile.hxx"
#include "util/StringCompare.hxx"
#ifdef ENABLE_DATABASE

View File

@ -5,7 +5,7 @@
#include "Data.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/Traits.hxx"
#include "fs/StandardDirectory.hxx"
#include "fs/glue/StandardDirectory.hxx"
#include "lib/fmt/RuntimeError.hxx"
#include "util/StringSplit.hxx"

View File

@ -15,12 +15,13 @@ config = static_library(
dependencies: [
log_dep,
fmt_dep,
fs_dep,
fs_glue_dep,
],
)
config_dep = declare_dependency(
link_with: config,
dependencies: [
fs_dep,
],
)

View File

@ -9,7 +9,7 @@
#include "config/Block.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "fs/StandardDirectory.hxx"
#include "fs/glue/StandardDirectory.hxx"
#include "lib/fmt/RuntimeError.hxx"
DatabasePtr

View File

@ -55,6 +55,7 @@ db_glue = static_library(
dependencies: [
fmt_dep,
log_dep,
fs_glue_dep,
],
)

View File

@ -5,10 +5,10 @@
#include "Log.hxx"
#include "lib/fmt/PathFormatter.hxx"
#include "config/Domain.hxx"
#include "FileInfo.hxx"
#include "Path.hxx"
#include "AllocatedPath.hxx"
#include "DirectoryReader.hxx"
#include "fs/FileInfo.hxx"
#include "fs/Path.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/DirectoryReader.hxx"
#include "system/Error.hxx"
void

View File

@ -1,8 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef MPD_FS_CHECK_FILE_HXX
#define MPD_FS_CHECK_FILE_HXX
#pragma once
class Path;
@ -12,5 +11,3 @@ class Path;
*/
void
CheckDirectoryReadable(Path path_fs);
#endif

View File

@ -6,8 +6,9 @@
#endif
#include "StandardDirectory.hxx"
#include "FileSystem.hxx"
#include "XDG.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "fs/XDG.hxx"
#include "config.h"
#include "util/StringSplit.hxx"

View File

@ -1,10 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef MPD_FS_STANDARD_DIRECTORY_HXX
#define MPD_FS_STANDARD_DIRECTORY_HXX
#pragma once
#include "AllocatedPath.hxx"
class AllocatedPath;
/**
* Obtains configuration directory for the current user.
@ -83,5 +82,3 @@ AllocatedPath
GetHomeDir(const char *user_name) noexcept;
#endif
#endif

16
src/fs/glue/meson.build Normal file
View File

@ -0,0 +1,16 @@
fs_glue = static_library(
'fs_glue',
'StandardDirectory.cxx',
'CheckFile.cxx',
include_directories: inc,
dependencies: [
fs_dep,
fmt_dep,
log_dep,
util_dep,
],
)
fs_glue_dep = declare_dependency(
link_with: fs_glue,
)

View File

@ -10,8 +10,6 @@ fs_sources = [
'NarrowPath.cxx',
'FileSystem.cxx',
'List.cxx',
'StandardDirectory.cxx',
'CheckFile.cxx',
'LookupFile.cxx',
'DirectoryReader.cxx',
'io/TextFile.cxx',
@ -29,7 +27,6 @@ fs = static_library(
include_directories: inc,
dependencies: [
zlib_dep,
log_dep,
],
)

View File

@ -6,8 +6,9 @@
#include "StorageInterface.hxx"
#include "plugins/LocalStorage.hxx"
#include "config/Data.hxx"
#include "fs/StandardDirectory.hxx"
#include "fs/CheckFile.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/glue/StandardDirectory.hxx"
#include "fs/glue/CheckFile.hxx"
#include "lib/fmt/RuntimeError.hxx"
#include "util/UriExtract.hxx"

View File

@ -20,6 +20,7 @@ storage_glue = static_library(
include_directories: inc,
dependencies: [
log_dep,
fs_glue_dep,
],
)