summaryrefslogtreecommitdiff
path: root/script/uri.lua
blob: 8f570daf14cc4167f2742276a2a555eb9403391c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local fs = require 'bee.filesystem'
local furi = require 'file-uri'

local function encode(path)
    return furi.encode(path:string())
end

local function decode(uri)
    return fs.path(furi.decode(uri))
end

return {
    encode = encode,
    decode = decode,
}