From be933ef2241d79558f91796cc5b3a161f72ebf9c Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 19 Oct 2020 00:52:24 +0200 Subject: sync with upstream --- xbmc/utils/FileUtils.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 xbmc/utils/FileUtils.h (limited to 'xbmc/utils/FileUtils.h') diff --git a/xbmc/utils/FileUtils.h b/xbmc/utils/FileUtils.h new file mode 100644 index 0000000..afd1552 --- /dev/null +++ b/xbmc/utils/FileUtils.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2010-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#pragma once + +#include "FileItem.h" + +#include + +class CFileUtils +{ +public: + static bool CheckFileAccessAllowed(const std::string &filePath); + static bool DeleteItem(const CFileItemPtr &item); + static bool DeleteItem(const std::string &strPath); + static bool RenameFile(const std::string &strFile); + static bool RemoteAccessAllowed(const std::string &strPath); + static unsigned int LoadFile(const std::string &filename, void* &outputBuffer); + /*! \brief Get the modified date of a file if its invalid it returns the creation date - this behavior changes when you set bUseLatestDate + \param strFileNameAndPath path to the file + \param bUseLatestDate use the newer datetime of the files mtime and ctime + \return Returns the file date, can return a invalid date if problems occur + */ + static CDateTime GetModificationDate(const std::string& strFileNameAndPath, const bool& bUseLatestDate); + static CDateTime GetModificationDate(const int& code, const std::string& strFileNameAndPath); +}; -- cgit v1.2.3