diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h index 3222e8b..76210cf 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h | |||
| @@ -119,14 +119,26 @@ extern "C" | |||
| 119 | } /* extern "C" */ | 119 | } /* extern "C" */ |
| 120 | 120 | ||
| 121 | //============================================================================== | 121 | //============================================================================== |
| 122 | /// \defgroup cpp_kodi_vfs_CFile_Defs Definitions, structures and enumerators | 122 | /// |
| 123 | /// \ingroup cpp_kodi_vfs_CFile | 123 | /// \defgroup cpp_kodi_vfs Interface - kodi::vfs |
| 124 | /// \ingroup cpp | ||
| 125 | /// @brief **Virtual filesystem functions** | ||
| 126 | /// | ||
| 127 | /// | ||
| 128 | /// It has the header \ref Filesystem.h "#include <kodi/Filesystem.h>" be | ||
| 129 | /// included to enjoy it. | ||
| 130 | /// | ||
| 131 | //------------------------------------------------------------------------------ | ||
| 132 | |||
| 133 | //============================================================================== | ||
| 134 | /// \defgroup cpp_kodi_vfs_Defs Definitions, structures and enumerators | ||
| 135 | /// \ingroup cpp_kodi_vfs | ||
| 124 | /// @brief **Virtual file Server definition values** | 136 | /// @brief **Virtual file Server definition values** |
| 125 | //------------------------------------------------------------------------------ | 137 | //------------------------------------------------------------------------------ |
| 126 | 138 | ||
| 127 | //============================================================================== | 139 | //============================================================================== |
| 128 | /// | 140 | /// |
| 129 | /// @ingroup cpp_kodi_vfs_CFile_Defs | 141 | /// @ingroup cpp_kodi_vfs_Defs |
| 130 | /// Flags to define way how file becomes opened with kodi::vfs::CFile::OpenFile() | 142 | /// Flags to define way how file becomes opened with kodi::vfs::CFile::OpenFile() |
| 131 | /// | 143 | /// |
| 132 | /// The values can be used together, e.g. <b>`file.Open("myfile", READ_TRUNCATED | READ_CHUNKED);`</b> | 144 | /// The values can be used together, e.g. <b>`file.Open("myfile", READ_TRUNCATED | READ_CHUNKED);`</b> |
| @@ -166,7 +178,7 @@ typedef enum OpenFileFlags | |||
| 166 | //------------------------------------------------------------------------------ | 178 | //------------------------------------------------------------------------------ |
| 167 | 179 | ||
| 168 | //============================================================================== | 180 | //============================================================================== |
| 169 | /// \ingroup cpp_kodi_vfs_CFile_Defs | 181 | /// \ingroup cpp_kodi_vfs_Defs |
| 170 | /// @brief Used CURL message types | 182 | /// @brief Used CURL message types |
| 171 | /// | 183 | /// |
| 172 | typedef enum CURLOptiontype | 184 | typedef enum CURLOptiontype |
| @@ -184,8 +196,11 @@ typedef enum CURLOptiontype | |||
| 184 | 196 | ||
| 185 | //============================================================================ | 197 | //============================================================================ |
| 186 | /// | 198 | /// |
| 187 | /// \ingroup cpp_kodi_vfs_CFile_Defs | 199 | /// \ingroup cpp_kodi_vfs_Defs |
| 188 | /// @brief Information about a file | 200 | /// @brief File information status |
| 201 | /// | ||
| 202 | /// Used on kodi::vfs::StatFile(), all of these calls return a this stat | ||
| 203 | /// structure, which contains the following fields: | ||
| 189 | /// | 204 | /// |
| 190 | struct STAT_STRUCTURE | 205 | struct STAT_STRUCTURE |
| 191 | { | 206 | { |
| @@ -785,7 +800,7 @@ namespace vfs | |||
| 785 | 800 | ||
| 786 | //============================================================================ | 801 | //============================================================================ |
| 787 | /// | 802 | /// |
| 788 | /// \ingroup cpp_kodi | 803 | /// @ingroup cpp_kodi_vfs |
| 789 | /// @brief Returns the translated path | 804 | /// @brief Returns the translated path |
| 790 | /// | 805 | /// |
| 791 | /// @param[in] source string or unicode - Path to format | 806 | /// @param[in] source string or unicode - Path to format |
| @@ -929,7 +944,7 @@ namespace vfs | |||
| 929 | /// fprintf(stderr, "Log file should be always present, is it present? %s\n", exists ? "yes" : "no"); | 944 | /// fprintf(stderr, "Log file should be always present, is it present? %s\n", exists ? "yes" : "no"); |
| 930 | /// ~~~~~~~~~~~~~ | 945 | /// ~~~~~~~~~~~~~ |
| 931 | /// | 946 | /// |
| 932 | static inline bool FileExists(const std::string& filename, bool usecache = false) | 947 | inline bool FileExists(const std::string& filename, bool usecache = false) |
| 933 | { | 948 | { |
| 934 | return ::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->file_exists(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str(), usecache); | 949 | return ::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->file_exists(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str(), usecache); |
| 935 | } | 950 | } |
| @@ -980,7 +995,7 @@ namespace vfs | |||
| 980 | /// ret); | 995 | /// ret); |
| 981 | /// ~~~~~~~~~~~~~ | 996 | /// ~~~~~~~~~~~~~ |
| 982 | /// | 997 | /// |
| 983 | static inline bool StatFile(const std::string& filename, STAT_STRUCTURE& buffer) | 998 | inline bool StatFile(const std::string& filename, STAT_STRUCTURE& buffer) |
| 984 | { | 999 | { |
| 985 | struct __stat64 frontendBuffer = { }; | 1000 | struct __stat64 frontendBuffer = { }; |
| 986 | if (::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->stat_file(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str(), &frontendBuffer)) | 1001 | if (::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->stat_file(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str(), &frontendBuffer)) |
| @@ -1045,7 +1060,7 @@ namespace vfs | |||
| 1045 | /// } | 1060 | /// } |
| 1046 | /// ~~~~~~~~~~~~~ | 1061 | /// ~~~~~~~~~~~~~ |
| 1047 | /// | 1062 | /// |
| 1048 | static inline bool DeleteFile(const std::string& filename) | 1063 | inline bool DeleteFile(const std::string& filename) |
| 1049 | { | 1064 | { |
| 1050 | return ::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->delete_file(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str()); | 1065 | return ::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->delete_file(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str()); |
| 1051 | } | 1066 | } |
| @@ -1061,7 +1076,7 @@ namespace vfs | |||
| 1061 | /// @return true if successfully renamed | 1076 | /// @return true if successfully renamed |
| 1062 | /// | 1077 | /// |
| 1063 | /// | 1078 | /// |
| 1064 | static inline bool RenameFile(const std::string& filename, const std::string& newFileName) | 1079 | inline bool RenameFile(const std::string& filename, const std::string& newFileName) |
| 1065 | { | 1080 | { |
| 1066 | return ::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->rename_file(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str(), newFileName.c_str()); | 1081 | return ::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->rename_file(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str(), newFileName.c_str()); |
| 1067 | } | 1082 | } |
| @@ -1077,7 +1092,7 @@ namespace vfs | |||
| 1077 | /// @return true if successfully copied | 1092 | /// @return true if successfully copied |
| 1078 | /// | 1093 | /// |
| 1079 | /// | 1094 | /// |
| 1080 | static inline bool CopyFile(const std::string& filename, const std::string& destination) | 1095 | inline bool CopyFile(const std::string& filename, const std::string& destination) |
| 1081 | { | 1096 | { |
| 1082 | return ::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->copy_file(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str(), destination.c_str()); | 1097 | return ::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->copy_file(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, filename.c_str(), destination.c_str()); |
| 1083 | } | 1098 | } |
