Files
public enum Files
Shares information & filesystem listings (Kodi Namespace & Kodi Global Type)
-
The type of media; either an image or a file (SwiftlyKodi Type)
Note
This enum is used to convert an internal Kodi path to a full pathDeclaration
Swift
enum MediaType : String
-
The properties of a file (SwiftlyKodi Type)
See moreDeclaration
Swift
enum Property
-
getDirectory(directory:
Asynchronousmedia: ) -
Convert an internal Kodi path to a full path (SwiftlyKodi API)
Kodi does not store the full path of a file in the database; it must be converted to a full path
Note
Because of performance, I do’t use ‘Files.prepareDownload’ here
Declaration
Swift
public static func getFullPath(file: String, type: Files.MediaType) -> String
Parameters
file
The internal Kodi path
type
The
MediaType
; an image or a fileReturn Value
A string with the full path to the file
-
prepareDownload(path:
Asynchronous) Provides a way to download a given file (Kodi API)
Declaration
Swift
public static func prepareDownload(path: String) async -> Files.Property.Value
Parameters
path
The internal Kodi path of the file
Return Value
The properties of the file