Commit a5fa43b5 authored by Max Kellermann's avatar Max Kellermann

fs/io: move to io/

parent 8681a3d7
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
#include "PlaylistDatabase.hxx" #include "PlaylistDatabase.hxx"
#include "db/PlaylistVector.hxx" #include "db/PlaylistVector.hxx"
#include "fs/io/LineReader.hxx" #include "io/LineReader.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "time/ChronoUtil.hxx" #include "time/ChronoUtil.hxx"
#include "util/StringStrip.hxx" #include "util/StringStrip.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
#include "Mapper.hxx" #include "Mapper.hxx"
#include "protocol/RangeArg.hxx" #include "protocol/RangeArg.hxx"
#include "fs/io/TextFile.hxx" #include "fs/io/TextFile.hxx"
#include "fs/io/FileOutputStream.hxx" #include "io/FileOutputStream.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "config/Data.hxx" #include "config/Data.hxx"
#include "config/Option.hxx" #include "config/Option.hxx"
#include "config/Defaults.hxx" #include "config/Defaults.hxx"
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
#include "fs/AllocatedPath.hxx" #include "fs/AllocatedPath.hxx"
#include "fs/Traits.hxx" #include "fs/Traits.hxx"
#include "fs/FileSystem.hxx" #include "fs/FileSystem.hxx"
#include "fs/io/FileOutputStream.hxx" #include "io/FileOutputStream.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "util/UriExtract.hxx" #include "util/UriExtract.hxx"
static void static void
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
#include "db/plugins/simple/Song.hxx" #include "db/plugins/simple/Song.hxx"
#include "song/DetachedSong.hxx" #include "song/DetachedSong.hxx"
#include "TagSave.hxx" #include "TagSave.hxx"
#include "fs/io/LineReader.hxx" #include "io/LineReader.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "tag/ParseName.hxx" #include "tag/ParseName.hxx"
#include "tag/Tag.hxx" #include "tag/Tag.hxx"
#include "tag/Builder.hxx" #include "tag/Builder.hxx"
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
#include "output/State.hxx" #include "output/State.hxx"
#include "queue/PlaylistState.hxx" #include "queue/PlaylistState.hxx"
#include "fs/io/TextFile.hxx" #include "fs/io/TextFile.hxx"
#include "fs/io/FileOutputStream.hxx" #include "io/FileOutputStream.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "storage/StorageState.hxx" #include "storage/StorageState.hxx"
#include "Partition.hxx" #include "Partition.hxx"
#include "Instance.hxx" #include "Instance.hxx"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "TagSave.hxx" #include "TagSave.hxx"
#include "tag/Tag.hxx" #include "tag/Tag.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#define SONG_TIME "Time: " #define SONG_TIME "Time: "
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#include "fs/FileSystem.hxx" #include "fs/FileSystem.hxx"
#include "fs/List.hxx" #include "fs/List.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "fs/io/FileReader.hxx" #include "io/FileReader.hxx"
#include "fs/io/BufferedReader.hxx" #include "io/BufferedReader.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <cassert> #include <cassert>
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
#include "DatabaseSave.hxx" #include "DatabaseSave.hxx"
#include "db/DatabaseLock.hxx" #include "db/DatabaseLock.hxx"
#include "DirectorySave.hxx" #include "DirectorySave.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "fs/io/LineReader.hxx" #include "io/LineReader.hxx"
#include "tag/ParseName.hxx" #include "tag/ParseName.hxx"
#include "tag/Settings.hxx" #include "tag/Settings.hxx"
#include "fs/Charset.hxx" #include "fs/Charset.hxx"
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
#include "SongSave.hxx" #include "SongSave.hxx"
#include "song/DetachedSong.hxx" #include "song/DetachedSong.hxx"
#include "PlaylistDatabase.hxx" #include "PlaylistDatabase.hxx"
#include "fs/io/LineReader.hxx" #include "io/LineReader.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "time/ChronoUtil.hxx" #include "time/ChronoUtil.hxx"
#include "util/StringAPI.hxx" #include "util/StringAPI.hxx"
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
#include "db/DatabaseLock.hxx" #include "db/DatabaseLock.hxx"
#include "db/DatabaseError.hxx" #include "db/DatabaseError.hxx"
#include "fs/io/TextFile.hxx" #include "fs/io/TextFile.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "fs/io/FileOutputStream.hxx" #include "io/FileOutputStream.hxx"
#include "fs/FileInfo.hxx" #include "fs/FileInfo.hxx"
#include "config/Block.hxx" #include "config/Block.hxx"
#include "fs/FileSystem.hxx" #include "fs/FileSystem.hxx"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include "Log.hxx" #include "Log.hxx"
#ifdef ENABLE_ZLIB #ifdef ENABLE_ZLIB
#include "fs/io/GzipOutputStream.hxx" #include "lib/zlib/GzipOutputStream.hxx"
#endif #endif
#include <cerrno> #include <cerrno>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_DECODER_READER_HXX #ifndef MPD_DECODER_READER_HXX
#define MPD_DECODER_READER_HXX #define MPD_DECODER_READER_HXX
#include "fs/io/Reader.hxx" #include "io/Reader.hxx"
class DecoderClient; class DecoderClient;
class InputStream; class InputStream;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "fs/AllocatedPath.hxx" #include "fs/AllocatedPath.hxx"
#include "lib/icu/Converter.hxx" #include "lib/icu/Converter.hxx"
#ifdef HAVE_SIDPLAYFP #ifdef HAVE_SIDPLAYFP
#include "fs/io/FileReader.hxx" #include "io/FileReader.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#endif #endif
#include "util/StringFormat.hxx" #include "util/StringFormat.hxx"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "ToOutputStream.hxx" #include "ToOutputStream.hxx"
#include "EncoderInterface.hxx" #include "EncoderInterface.hxx"
#include "fs/io/OutputStream.hxx" #include "io/OutputStream.hxx"
void void
EncoderToOutputStream(OutputStream &os, Encoder &encoder) EncoderToOutputStream(OutputStream &os, Encoder &encoder)
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#ifdef USE_XDG #ifdef USE_XDG
#include "util/StringStrip.hxx" #include "util/StringStrip.hxx"
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
#include "io/TextFile.hxx" #include "fs/io/TextFile.hxx"
#include <string.h> #include <string.h>
#include <utility> #include <utility>
#endif #endif
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
*/ */
#include "TextFile.hxx" #include "TextFile.hxx"
#include "FileReader.hxx" #include "io/FileReader.hxx"
#include "AutoGunzipReader.hxx" #include "io/BufferedReader.hxx"
#include "BufferedReader.hxx" #include "lib/zlib/AutoGunzipReader.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include <cassert> #include <cassert>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_TEXT_FILE_HXX #ifndef MPD_TEXT_FILE_HXX
#define MPD_TEXT_FILE_HXX #define MPD_TEXT_FILE_HXX
#include "LineReader.hxx" #include "io/LineReader.hxx"
#include "config.h" #include "config.h"
#include <memory> #include <memory>
......
...@@ -14,12 +14,7 @@ fs_sources = [ ...@@ -14,12 +14,7 @@ fs_sources = [
'CheckFile.cxx', 'CheckFile.cxx',
'LookupFile.cxx', 'LookupFile.cxx',
'DirectoryReader.cxx', 'DirectoryReader.cxx',
'io/PeekReader.cxx',
'io/FileReader.cxx',
'io/BufferedReader.cxx',
'io/TextFile.cxx', 'io/TextFile.cxx',
'io/FileOutputStream.cxx',
'io/BufferedOutputStream.cxx',
] ]
if is_windows if is_windows
...@@ -28,14 +23,6 @@ else ...@@ -28,14 +23,6 @@ else
shlwapi_dep = dependency('', required: false) shlwapi_dep = dependency('', required: false)
endif endif
if zlib_dep.found()
fs_sources += [
'io/GunzipReader.cxx',
'io/AutoGunzipReader.cxx',
'io/GzipOutputStream.cxx',
]
endif
fs = static_library( fs = static_library(
'fs', 'fs',
fs_sources, fs_sources,
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_INPUT_READER_HXX #ifndef MPD_INPUT_READER_HXX
#define MPD_INPUT_READER_HXX #define MPD_INPUT_READER_HXX
#include "fs/io/Reader.hxx" #include "io/Reader.hxx"
class InputStream; class InputStream;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "../InputStream.hxx" #include "../InputStream.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "fs/FileInfo.hxx" #include "fs/FileInfo.hxx"
#include "fs/io/FileReader.hxx" #include "io/FileReader.hxx"
#include "io/FileDescriptor.hxx" #include "io/FileDescriptor.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
......
...@@ -2,6 +2,11 @@ io = static_library( ...@@ -2,6 +2,11 @@ io = static_library(
'io', 'io',
'FileDescriptor.cxx', 'FileDescriptor.cxx',
'Open.cxx', 'Open.cxx',
'PeekReader.cxx',
'FileReader.cxx',
'BufferedReader.cxx',
'FileOutputStream.cxx',
'BufferedOutputStream.cxx',
include_directories: inc, include_directories: inc,
) )
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
#include "OggSyncState.hxx" #include "OggSyncState.hxx"
#include "fs/io/Reader.hxx" #include "io/Reader.hxx"
bool bool
OggSyncState::Feed(size_t size) OggSyncState::Feed(size_t size)
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_AUTO_GUNZIP_READER_HXX #ifndef MPD_AUTO_GUNZIP_READER_HXX
#define MPD_AUTO_GUNZIP_READER_HXX #define MPD_AUTO_GUNZIP_READER_HXX
#include "PeekReader.hxx" #include "io/PeekReader.hxx"
#include <memory> #include <memory>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifndef GUNZIP_READER_HXX #ifndef GUNZIP_READER_HXX
#define GUNZIP_READER_HXX #define GUNZIP_READER_HXX
#include "Reader.hxx" #include "io/Reader.hxx"
#include "util/StaticFifoBuffer.hxx" #include "util/StaticFifoBuffer.hxx"
#include <zlib.h> #include <zlib.h>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifndef GZIP_OUTPUT_STREAM_HXX #ifndef GZIP_OUTPUT_STREAM_HXX
#define GZIP_OUTPUT_STREAM_HXX #define GZIP_OUTPUT_STREAM_HXX
#include "OutputStream.hxx" #include "io/OutputStream.hxx"
#include <zlib.h> #include <zlib.h>
......
...@@ -7,6 +7,9 @@ endif ...@@ -7,6 +7,9 @@ endif
zlib = static_library( zlib = static_library(
'zlib', 'zlib',
'Error.cxx', 'Error.cxx',
'GunzipReader.cxx',
'GzipOutputStream.cxx',
'AutoGunzipReader.cxx',
include_directories: inc, include_directories: inc,
dependencies: [ dependencies: [
zlib_dep, zlib_dep,
...@@ -17,5 +20,6 @@ zlib_dep = declare_dependency( ...@@ -17,5 +20,6 @@ zlib_dep = declare_dependency(
link_with: zlib, link_with: zlib,
dependencies: [ dependencies: [
zlib_dep, zlib_dep,
io_dep,
], ],
) )
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "system/PeriodClock.hxx" #include "system/PeriodClock.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <cassert> #include <cassert>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "MultipleOutputs.hxx" #include "MultipleOutputs.hxx"
#include "Domain.hxx" #include "Domain.hxx"
#include "Log.hxx" #include "Log.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
#include <stdlib.h> #include <stdlib.h>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "config/Path.hxx" #include "config/Path.hxx"
#include "Log.hxx" #include "Log.hxx"
#include "fs/AllocatedPath.hxx" #include "fs/AllocatedPath.hxx"
#include "fs/io/FileOutputStream.hxx" #include "io/FileOutputStream.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "util/ScopeExit.hxx" #include "util/ScopeExit.hxx"
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
#include "SingleMode.hxx" #include "SingleMode.hxx"
#include "StateFileConfig.hxx" #include "StateFileConfig.hxx"
#include "queue/QueueSave.hxx" #include "queue/QueueSave.hxx"
#include "fs/io/LineReader.hxx" #include "io/LineReader.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "player/Control.hxx" #include "player/Control.hxx"
#include "util/CharUtil.hxx" #include "util/CharUtil.hxx"
#include "util/StringAPI.hxx" #include "util/StringAPI.hxx"
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
#include "song/DetachedSong.hxx" #include "song/DetachedSong.hxx"
#include "SongSave.hxx" #include "SongSave.hxx"
#include "playlist/PlaylistSong.hxx" #include "playlist/PlaylistSong.hxx"
#include "fs/io/LineReader.hxx" #include "io/LineReader.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
#include "Log.hxx" #include "Log.hxx"
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include "StorageState.hxx" #include "StorageState.hxx"
#include "lib/fmt/ExceptionFormatter.hxx" #include "lib/fmt/ExceptionFormatter.hxx"
#include "fs/io/LineReader.hxx" #include "io/LineReader.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "storage/Registry.hxx" #include "storage/Registry.hxx"
#include "storage/CompositeStorage.hxx" #include "storage/CompositeStorage.hxx"
#include "db/plugins/simple/SimpleDatabasePlugin.hxx" #include "db/plugins/simple/SimpleDatabasePlugin.hxx"
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#include "decoder/DecoderPlugin.hxx" #include "decoder/DecoderPlugin.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "fs/NarrowPath.hxx" #include "fs/NarrowPath.hxx"
#include "fs/io/StdioOutputStream.hxx" #include "io/StdioOutputStream.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "util/PrintException.hxx" #include "util/PrintException.hxx"
#include "util/UriExtract.hxx" #include "util/UriExtract.hxx"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include "fs/io/FileOutputStream.hxx" #include "io/FileOutputStream.hxx"
#include "fs/NarrowPath.hxx" #include "fs/NarrowPath.hxx"
#include "util/PrintException.hxx" #include "util/PrintException.hxx"
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
#include "playlist/PlaylistPlugin.hxx" #include "playlist/PlaylistPlugin.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "fs/NarrowPath.hxx" #include "fs/NarrowPath.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "fs/io/StdioOutputStream.hxx" #include "io/StdioOutputStream.hxx"
#include "thread/Cond.hxx" #include "thread/Cond.hxx"
#include "util/PrintException.hxx" #include "util/PrintException.hxx"
......
...@@ -183,7 +183,8 @@ if zlib_dep.found() ...@@ -183,7 +183,8 @@ if zlib_dep.found()
'run_gzip.cxx', 'run_gzip.cxx',
include_directories: inc, include_directories: inc,
dependencies: [ dependencies: [
fs_dep, zlib_dep,
util_dep,
], ],
) )
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "pcm/AudioFormat.hxx" #include "pcm/AudioFormat.hxx"
#include "pcm/AudioParser.hxx" #include "pcm/AudioParser.hxx"
#include "config/Block.hxx" #include "config/Block.hxx"
#include "fs/io/StdioOutputStream.hxx" #include "io/StdioOutputStream.hxx"
#include "util/PrintException.hxx" #include "util/PrintException.hxx"
#include <exception> #include <exception>
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include "fs/io/GunzipReader.hxx" #include "lib/zlib/GunzipReader.hxx"
#include "fs/io/FileReader.hxx" #include "io/FileReader.hxx"
#include "fs/io/StdioOutputStream.hxx" #include "io/StdioOutputStream.hxx"
#include "fs/NarrowPath.hxx" #include "fs/NarrowPath.hxx"
#include "util/PrintException.hxx" #include "util/PrintException.hxx"
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include "fs/io/GzipOutputStream.hxx" #include "lib/zlib/GzipOutputStream.hxx"
#include "fs/io/StdioOutputStream.hxx" #include "io/StdioOutputStream.hxx"
#include "system/Error.hxx" #include "system/Error.hxx"
#include "util/PrintException.hxx" #include "util/PrintException.hxx"
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#include "LogBackend.hxx" #include "LogBackend.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "fs/NarrowPath.hxx" #include "fs/NarrowPath.hxx"
#include "fs/io/BufferedOutputStream.hxx" #include "io/BufferedOutputStream.hxx"
#include "fs/io/StdioOutputStream.hxx" #include "io/StdioOutputStream.hxx"
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include "util/OptionDef.hxx" #include "util/OptionDef.hxx"
#include "util/OptionParser.hxx" #include "util/OptionParser.hxx"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "encoder/ToOutputStream.hxx" #include "encoder/ToOutputStream.hxx"
#include "pcm/AudioFormat.hxx" #include "pcm/AudioFormat.hxx"
#include "config/Block.hxx" #include "config/Block.hxx"
#include "fs/io/StdioOutputStream.hxx" #include "io/StdioOutputStream.hxx"
#include "tag/Tag.hxx" #include "tag/Tag.hxx"
#include "tag/Builder.hxx" #include "tag/Builder.hxx"
#include "util/PrintException.hxx" #include "util/PrintException.hxx"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment