fs/io/FileOutputStream: merge all classes into one, add enum Mode
Prepare to add more modes.
This commit is contained in:
@@ -199,7 +199,6 @@ SavePlaylistFile(const PlaylistFileContents &contents, const char *utf8path)
|
||||
assert(!path_fs.IsNull());
|
||||
|
||||
FileOutputStream fos(path_fs);
|
||||
|
||||
BufferedOutputStream bos(fos);
|
||||
|
||||
for (const auto &uri_utf8 : contents)
|
||||
@@ -354,7 +353,7 @@ try {
|
||||
const auto path_fs = spl_map_to_fs(utf8path);
|
||||
assert(!path_fs.IsNull());
|
||||
|
||||
AppendFileOutputStream fos(path_fs);
|
||||
FileOutputStream fos(path_fs, FileOutputStream::Mode::APPEND_EXISTING);
|
||||
|
||||
if (fos.Tell() / (MPD_PATH_MAX + 1) >= playlist_max_length)
|
||||
throw PlaylistError(PlaylistResult::TOO_LARGE,
|
||||
|
Reference in New Issue
Block a user