Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
Filesystem.h File Reference
#include "AddonBase.h"
#include "c-api/filesystem.h"
#include <cstring>
#include <map>
#include <vector>

Classes

class  kodi::vfs::FileStatus
 
class  kodi::vfs::CacheStatus
 
class  kodi::vfs::HttpHeader
 
class  kodi::vfs::CDirEntry
 
class  kodi::vfs::CFile
 

Namespaces

namespace  kodi
 
namespace  kodi::vfs
 

Functions

bool ATTR_DLL_LOCAL kodi::vfs::CreateDirectory (const std::string &path)
 Make a directory.
 
bool ATTR_DLL_LOCAL kodi::vfs::DirectoryExists (const std::string &path)
 Verifying the Existence of a Directory.
 
bool ATTR_DLL_LOCAL kodi::vfs::RemoveDirectory (const std::string &path, bool recursive=false)
 Removes a directory.
 
bool ATTR_DLL_LOCAL kodi::vfs::GetDirectory (const std::string &path, const std::string &mask, std::vector< kodi::vfs::CDirEntry > &items)
 Lists a directory.
 
bool ATTR_DLL_LOCAL kodi::vfs::FileExists (const std::string &filename, bool usecache=false)
 Check if a file exists.
 
bool ATTR_DLL_LOCAL kodi::vfs::StatFile (const std::string &filename, kodi::vfs::FileStatus &buffer)
 Get file status.
 
bool ATTR_DLL_LOCAL kodi::vfs::DeleteFile (const std::string &filename)
 Deletes a file.
 
bool ATTR_DLL_LOCAL kodi::vfs::RenameFile (const std::string &filename, const std::string &newFileName)
 Rename a file name.
 
bool ATTR_DLL_LOCAL kodi::vfs::CopyFile (const std::string &filename, const std::string &destination)
 Copy a file from source to destination.
 
std::string ATTR_DLL_LOCAL kodi::vfs::GetFileMD5 (const std::string &path)
 Retrieve MD5sum of a file.
 
std::string ATTR_DLL_LOCAL kodi::vfs::GetCacheThumbName (const std::string &filename)
 Returns a thumb cache filename.
 
std::string ATTR_DLL_LOCAL kodi::vfs::MakeLegalFileName (const std::string &filename)
 Make filename valid.
 
std::string ATTR_DLL_LOCAL kodi::vfs::MakeLegalPath (const std::string &path)
 Make directory name valid.
 
std::string ATTR_DLL_LOCAL kodi::vfs::TranslateSpecialProtocol (const std::string &source)
 Returns the translated path.
 
bool ATTR_DLL_LOCAL kodi::vfs::GetDiskSpace (const std::string &path, uint64_t &capacity, uint64_t &free, uint64_t &available)
 Retrieves information about the amount of space that is available on a disk volume.
 
std::string ATTR_DLL_LOCAL kodi::vfs::GetFileName (const std::string &path)
 Return the file name from given complete path string.
 
std::string ATTR_DLL_LOCAL kodi::vfs::GetDirectoryName (const std::string &path)
 Return the directory name from given complete path string.
 
void ATTR_DLL_LOCAL kodi::vfs::RemoveSlashAtEnd (std::string &path)
 Remove the slash on given path name.
 
unsigned int ATTR_DLL_LOCAL kodi::vfs::GetChunkSize (unsigned int chunk, unsigned int minimum)
 Return a size aligned to the chunk size at least as large as the chunk size.
 
bool ATTR_DLL_LOCAL kodi::vfs::IsInternetStream (const std::string &path, bool strictCheck=false)
 Checks the given path contains a known internet protocol.
 
bool ATTR_DLL_LOCAL kodi::vfs::IsOnLAN (const std::string &path)
 Checks whether the specified path refers to a local network.
 
bool ATTR_DLL_LOCAL kodi::vfs::IsRemote (const std::string &path)
 Checks specified path for external network.
 
bool ATTR_DLL_LOCAL kodi::vfs::IsLocal (const std::string &path)
 Checks whether the given path refers to the own system.
 
bool ATTR_DLL_LOCAL kodi::vfs::IsURL (const std::string &path)
 Checks specified path is a regular URL, e.g. "someprotocol://path/to/file".
 
bool ATTR_DLL_LOCAL kodi::vfs::GetHttpHeader (const std::string &url, HttpHeader &header)
 To get HTTP header information.
 
bool ATTR_DLL_LOCAL kodi::vfs::GetMimeType (const std::string &url, std::string &mimeType, const std::string &useragent="")
 Get file mime type.
 
bool ATTR_DLL_LOCAL kodi::vfs::GetContentType (const std::string &url, std::string &content, const std::string &useragent="")
 Get file content-type.
 
bool ATTR_DLL_LOCAL kodi::vfs::GetCookies (const std::string &url, std::string &cookies)
 Get cookies stored by CURL in RFC 2109 format.