mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-24 14:36:15 +02:00
Set title meta data for FileStream
This commit is contained in:
parent
cece83819f
commit
2b6774bdca
2 changed files with 10 additions and 9 deletions
|
@ -32,6 +32,7 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
@ -45,17 +46,10 @@ namespace file
|
|||
|
||||
static bool exists(const std::string& filename)
|
||||
{
|
||||
if (filename.empty())
|
||||
return false;
|
||||
#ifdef WINDOWS
|
||||
DWORD dwAttrib = GetFileAttributes(filename.c_str());
|
||||
return (dwAttrib != INVALID_FILE_ATTRIBUTES);
|
||||
#else
|
||||
struct stat buffer;
|
||||
return (stat(filename.c_str(), &buffer) == 0);
|
||||
#endif
|
||||
return std::filesystem::exists(filename);
|
||||
}
|
||||
|
||||
|
||||
#ifndef WINDOWS
|
||||
static void do_chown(const std::string& file_path, const std::string& user_name, const std::string& group_name)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue