Kodi Documentation  18.0
Kodi is an open source media player and entertainment hub.
addons/kodi-addon-dev-kit/include/kodi/Filesystem.h File Reference
#include "AddonBase.h"
#include <map>
#include <vector>
#include <sys/stat.h>

Classes

struct  VFSProperty
 
struct  VFSDirEntry
 
struct  AddonToKodiFuncTable_kodi_filesystem
 
struct  STAT_STRUCTURE
 File information status. More...
 
class  kodi::vfs::CDirEntry
 
class  kodi::vfs::CFile
 

Namespaces

 kodi
 
 kodi::vfs
 

Macros

#define __stat64   stat64
 
#define S_ISDIR(mode)   ((((mode)) & 0170000) == (0040000))
 
#define S_ISLNK(mode)   ((((mode)) & 0170000) == (0120000))
 

Typedefs

typedef struct AddonToKodiFuncTable_kodi_filesystem AddonToKodiFuncTable_kodi_filesystem
 
typedef enum OpenFileFlags OpenFileFlags
 
typedef enum CURLOptiontype CURLOptiontype
 CURL message types. More...
 
typedef enum FilePropertyTypes FilePropertyTypes
 CURL message types. More...
 

Enumerations

enum  OpenFileFlags {
  READ_TRUNCATED = 0x01, READ_CHUNKED = 0x02, READ_CACHED = 0x04, READ_NO_CACHE = 0x08,
  READ_BITRATE = 0x10, READ_MULTI_STREAM = 0x20, READ_AUDIO_VIDEO = 0x40, READ_AFTER_WRITE = 0x80,
  READ_REOPEN = 0x100
}
 
enum  CURLOptiontype { ADDON_CURL_OPTION_OPTION, ADDON_CURL_OPTION_PROTOCOL, ADDON_CURL_OPTION_CREDENTIALS, ADDON_CURL_OPTION_HEADER }
 CURL message types. More...
 
enum  FilePropertyTypes {
  ADDON_FILE_PROPERTY_RESPONSE_PROTOCOL, ADDON_FILE_PROPERTY_RESPONSE_HEADER, ADDON_FILE_PROPERTY_CONTENT_TYPE, ADDON_FILE_PROPERTY_CONTENT_CHARSET,
  ADDON_FILE_PROPERTY_MIME_TYPE, ADDON_FILE_PROPERTY_EFFECTIVE_URL
}
 CURL message types. More...
 

Functions

bool kodi::vfs::CreateDirectory (const std::string &path)
 Make a directory. More...
 
bool kodi::vfs::DirectoryExists (const std::string &path)
 Verifying the Existence of a Directory. More...
 
bool kodi::vfs::RemoveDirectory (const std::string &path)
 Removes a directory. More...
 
bool kodi::vfs::GetDirectory (const std::string &path, const std::string &mask, std::vector< CDirEntry > &items)
 Lists a directory. More...
 
std::string kodi::vfs::GetFileMD5 (const std::string &path)
 Retrieve MD5sum of a file. More...
 
std::string kodi::vfs::GetCacheThumbName (const std::string &filename)
 Returns a thumb cache filename. More...
 
std::string kodi::vfs::MakeLegalFileName (const std::string &filename)
 Make filename valid. More...
 
std::string kodi::vfs::MakeLegalPath (const std::string &path)
 Make directory name valid. More...
 
std::string kodi::vfs::TranslateSpecialProtocol (const std::string &source)
 Returns the translated path. More...
 
std::string kodi::vfs::GetFileName (const std::string &path)
 Return the file name from given complate path string. More...
 
std::string kodi::vfs::GetDirectoryName (const std::string &path)
 Return the directory name from given complate path string. More...
 
void kodi::vfs::RemoveSlashAtEnd (std::string &path)
 Remove the slash on given path name. More...
 
unsigned int 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. More...
 
bool kodi::vfs::FileExists (const std::string &filename, bool usecache=false)
 Check if a file exists. More...
 
bool kodi::vfs::StatFile (const std::string &filename, STAT_STRUCTURE &buffer)
 Get file status. More...
 
bool kodi::vfs::DeleteFile (const std::string &filename)
 Deletes a file. More...
 
bool kodi::vfs::RenameFile (const std::string &filename, const std::string &newFileName)
 Rename a file name. More...
 
bool kodi::vfs::CopyFile (const std::string &filename, const std::string &destination)
 Copy a file from source to destination. More...
 

Macro Definition Documentation

§ __stat64

#define __stat64   stat64

§ S_ISDIR

#define S_ISDIR (   mode)    ((((mode)) & 0170000) == (0040000))

§ S_ISLNK

#define S_ISLNK (   mode)    ((((mode)) & 0170000) == (0120000))

Typedef Documentation

§ AddonToKodiFuncTable_kodi_filesystem