21 enum class LanCheckMode
33 static void UnregisterAdvancedSettings();
35 static std::string GetDirectory(
const std::string &strFilePath);
37 static std::string GetFileName(
const CURL& url);
38 static std::string GetFileName(
const std::string& strFileNameAndPath);
39 static std::string GetFileOrFolderName(
const std::string& path);
41 static std::string GetExtension(
const CURL& url);
42 static std::string GetExtension(
const std::string& strFileName);
49 static bool HasPluginPath(
const CFileItem& item);
58 static bool HasExtension(
const std::string& strFileName);
70 static bool HasExtension(
const std::string& strFileName,
const std::string& strExtensions);
71 static bool HasExtension(
const CURL& url,
const std::string& strExtensions);
73 static void RemoveExtension(std::string& strFileName);
74 static std::string ReplaceExtension(
const std::string& strFile,
75 const std::string& strNewExtension);
76 static void Split(
const std::string& strFileNameAndPath,
77 std::string& strPath, std::string& strFileName);
78 static std::vector<std::string>
SplitPath(
const std::string& strPath);
80 static void GetCommonPath(std::string& strParent,
const std::string& strPath);
81 static std::string GetParentPath(
const std::string& strPath);
82 static bool GetParentPath(
const std::string& strPath, std::string& strParent);
88 static std::string GetBasePath(
const std::string& strPath);
97 static std::string ChangeBasePath(
const std::string &fromPath,
const std::string &fromFile,
const std::string &toPath,
const bool &bAddPath =
true);
99 static CURL SubstitutePath(
const CURL& url,
bool reverse =
false);
100 static std::string SubstitutePath(
const std::string& strPath,
bool reverse =
false);
109 static bool IsProtocol(
const std::string& url,
const std::string& type);
120 static bool PathHasParent(std::string path, std::string parent,
bool translate =
false);
130 static bool PathEquals(std::string path1, std::string path2,
bool ignoreTrailingSlash =
false,
bool ignoreURLOptions =
false);
132 static bool IsAddonsPath(
const std::string& strFile);
133 static bool IsSourcesPath(
const std::string& strFile);
134 static bool IsCDDA(
const std::string& strFile);
135 static bool IsDAV(
const std::string& strFile);
136 static bool IsDOSPath(
const std::string &path);
137 static bool IsDVD(
const std::string& strFile);
138 static bool IsFTP(
const std::string& strFile);
139 static bool IsHTTP(
const std::string& strFile,
bool bTranslate =
false);
140 static bool IsUDP(
const std::string& strFile);
141 static bool IsTCP(
const std::string& strFile);
142 static bool IsHD(
const std::string& strFileName);
143 static bool IsInArchive(
const std::string& strFile);
144 static bool IsInRAR(
const std::string& strFile);
145 static bool IsInternetStream(
const std::string& path,
bool bStrictCheck =
false);
146 static bool IsInternetStream(
const CURL& url,
bool bStrictCheck =
false);
147 static bool IsStreamedFilesystem(
const std::string& strPath);
148 static bool IsNetworkFilesystem(
const std::string& strPath);
149 static bool IsInAPK(
const std::string& strFile);
150 static bool IsInZIP(
const std::string& strFile);
151 static bool IsISO9660(
const std::string& strFile);
152 static bool IsLiveTV(
const std::string& strFile);
153 static bool IsPVRRecording(
const std::string& strFile);
154 static bool IsPVRRecordingFileOrFolder(
const std::string& strFile);
155 static bool IsPVRTVRecordingFileOrFolder(
const std::string& strFile);
156 static bool IsPVRRadioRecordingFileOrFolder(
const std::string& strFile);
157 static bool IsMultiPath(
const std::string& strPath);
158 static bool IsMusicDb(
const std::string& strFile);
159 static bool IsNfs(
const std::string& strFile);
160 static bool IsOnDVD(
const std::string& strFile);
161 static bool IsOnLAN(
const std::string& strFile,
162 LanCheckMode lanCheckMode = LanCheckMode::ONLY_LOCAL_SUBNET);
163 static bool IsHostOnLAN(
const std::string& hostName,
164 LanCheckMode lanCheckMode = LanCheckMode::ONLY_LOCAL_SUBNET);
165 static bool IsPlugin(
const std::string& strFile);
166 static bool IsScript(
const std::string& strFile);
167 static bool IsRAR(
const std::string& strFile);
168 static bool IsRemote(
const std::string& strFile);
169 static bool IsSmb(
const std::string& strFile);
170 static bool IsSpecial(
const std::string& strFile);
171 static bool IsStack(
const std::string& strFile);
172 static bool IsFavourite(
const std::string& strFile);
173 static bool IsUPnP(
const std::string& strFile);
174 static bool IsURL(
const std::string& strFile);
175 static bool IsVideoDb(
const std::string& strFile);
176 static bool IsAPK(
const std::string& strFile);
177 static bool IsZIP(
const std::string& strFile);
178 static bool IsArchive(
const std::string& strFile);
179 static bool IsDiscImage(
const std::string& file);
180 static bool IsDiscImageStack(
const std::string& file);
181 static bool IsBluray(
const std::string& strFile);
182 static bool IsAndroidApp(
const std::string& strFile);
183 static bool IsLibraryFolder(
const std::string& strFile);
184 static bool IsLibraryContent(
const std::string& strFile);
185 static bool IsPVR(
const std::string& strFile);
186 static bool IsPVRChannel(
const std::string& strFile);
187 static bool IsPVRChannelGroup(
const std::string& strFile);
188 static bool IsPVRGuideItem(
const std::string& strFile);
190 static std::string AppendSlash(std::string strFolder);
191 static void AddSlashAtEnd(std::string& strFolder);
192 static bool HasSlashAtEnd(
const std::string& strFile,
bool checkURL =
false);
193 static void RemoveSlashAtEnd(std::string& strFolder);
194 static bool CompareWithoutSlashAtEnd(
const std::string& strPath1,
const std::string& strPath2);
195 static std::string FixSlashesAndDups(
const std::string& path,
const char slashCharacter =
'/',
const size_t startFrom = 0);
207 static std::string CanonicalizePath(
const std::string& path,
const char slashCharacter =
'\\');
209 static CURL CreateArchivePath(
const std::string& type,
210 const CURL& archiveUrl,
211 const std::string& pathInArchive =
"",
212 const std::string& password =
"");
214 static std::string AddFileToFolder(
const std::string& strFolder,
const std::string& strFile);
215 template <
typename... T>
216 static std::string AddFileToFolder(
const std::string& strFolder,
const std::string& strFile, T... args)
218 auto newPath = AddFileToFolder(strFolder, strFile);
219 return AddFileToFolder(newPath, args...);
222 static bool HasParentInHostname(
const CURL& url);
223 static bool HasEncodedHostname(
const CURL& url);
224 static bool HasEncodedFilename(
const CURL& url);
238 static std::string GetRealPath(
const std::string &path);
250 static bool UpdateUrlEncoding(std::string &strFilename);
253 static std::string resolvePath(
const std::string &path);
Definition: TestNfsFile.cpp:22
Definition: AdvancedSettings.h:102
Definition: URIUtils.h:29
Represents a file on a share.
Definition: FileItem.h:102