mirror of https://github.com/status-im/nimqml.git
Merge pull request #34 from status-im/feat/download-messages
feat: expose to local file
This commit is contained in:
commit
ca381eb8a2
|
@ -60,3 +60,9 @@ proc url_host*(host: string): string =
|
||||||
|
|
||||||
proc url_replaceHostAndAddPath*(url: string, newHost: string, protocol: string = "", pathPrefix: string = ""): string =
|
proc url_replaceHostAndAddPath*(url: string, newHost: string, protocol: string = "", pathPrefix: string = ""): string =
|
||||||
result = $(dos_qurl_replaceHostAndAddPath(url.cstring, protocol.cstring, newHost.cstring, pathPrefix.cstring))
|
result = $(dos_qurl_replaceHostAndAddPath(url.cstring, protocol.cstring, newHost.cstring, pathPrefix.cstring))
|
||||||
|
|
||||||
|
proc url_toLocalFile*(fileUrl: string): string =
|
||||||
|
result = $(dos_to_local_file(fileUrl.cstring))
|
||||||
|
|
||||||
|
proc url_fromLocalFile*(filePath: string): string =
|
||||||
|
result = $(dos_from_local_file(filePath.cstring))
|
||||||
|
|
|
@ -355,3 +355,9 @@ proc dos_statusosnotification_show_notification(vptr: DosStatusOSNotificationObj
|
||||||
{.cdecl, dynlib: dynLibName, importc.}
|
{.cdecl, dynlib: dynLibName, importc.}
|
||||||
proc dos_statusosnotification_delete(vptr: DosStatusOSNotificationObject)
|
proc dos_statusosnotification_delete(vptr: DosStatusOSNotificationObject)
|
||||||
{.cdecl, dynlib: dynLibName, importc.}
|
{.cdecl, dynlib: dynLibName, importc.}
|
||||||
|
|
||||||
|
proc dos_to_local_file(fileUrl: cstring): cstring
|
||||||
|
{.cdecl, dynlib: dynLibName, importc.}
|
||||||
|
|
||||||
|
proc dos_from_local_file(filePath: cstring): cstring
|
||||||
|
{.cdecl, dynlib: dynLibName, importc.}
|
||||||
|
|
Loading…
Reference in New Issue