PolarBleLowLevelApi
public protocol PolarBleLowLevelApi
Undocumented
-
readFile(identifier:AsynchronousfilePath: ) Read a file over PFtp BLE client. API user must know the exact path to the desired file. Note that not all files in device are readable by this API. API user must also take care of parsing the returned ByteArray payload to the desired data object. NOTE: this is an experimental API intended for Polar internal use only. Polar will not support 3rd party users with this API.
Requires
Requires SDK feature(s):PolarBleSdkFeature.feature_polar_file_transferThrows
SeePolarErrorsfor possible errors. /Declaration
Swift
func readFile( identifier: String, filePath: String ) async throws -> Data?Return Value
File contents as
Data, ornilif the file is empty or not found. -
writeFile(identifier:AsynchronousfilePath: fileData: ) Write any file over PFtp BLE client. API user must know the exact path to the desired file. API user must also take care of parsing the returned ByteArray payload to the desired data object. NOTE: this is an experimental API intended for Polar internal use only. Polar will not support 3rd party users with this API.
Requires
Requires SDK feature(s):PolarBleSdkFeature.feature_polar_file_transferThrows
SeePolarErrorsfor possible errors. /Declaration
Swift
func writeFile( identifier: String, filePath: String, fileData: Data ) async throws -
deleteFileOrDirectory(identifier:AsynchronousfilePath: ) Delete any file or directory over PFtp BLE client. API user must know the exact path to the desired file. API user must also take care of parsing the returned ByteArray payload to the desired data object. NOTE: this is an experimental API intended for Polar internal use only. Polar will not support 3rd party users with this API.
Requires
Requires SDK feature(s):PolarBleSdkFeature.feature_polar_file_transferThrows
SeePolarErrorsfor possible errors.Declaration
Swift
func deleteFileOrDirectory( identifier: String, filePath: String ) async throws -
getFileList(identifier:AsynchronousdirectoryPath: recurseDeep: ) List all files in the given path NOTE: this is an experimental API intended for Polar internal use only. Polar will not support 3rd party users with this API.
Requires
Requires SDK feature(s):PolarBleSdkFeature.feature_polar_file_transferThrows
SeePolarErrorsfor possible errors.Declaration
Swift
func getFileList( identifier: String, directoryPath: String, recurseDeep: Bool ) async throws -> [String]Return Value
List of file paths found in the given directory.