/xbmc/utils/FileUtils.h
http://github.com/xbmc/xbmc · C Header · 30 lines · 14 code · 4 blank · 12 comment · 0 complexity · 56a0dc5533b43237eae6a5020206ed1a MD5 · raw file
- /*
- * 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 <string>
- 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);
- };