Mercurial Hosting > luan
comparison src/luan/modules/host/Hosting.luan @ 1416:db57d562c4bd
add Http.is_hosted
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 18 Oct 2019 15:06:32 -0600 |
parents | 5b8f76e26ab7 |
children | 732b5de211fc |
comparison
equal
deleted
inserted
replaced
1415:edfbcd7f8833 | 1416:db57d562c4bd |
---|---|
13 local Logging = require "luan:logging/Logging.luan" | 13 local Logging = require "luan:logging/Logging.luan" |
14 local logger = Logging.logger "Hosting" | 14 local logger = Logging.logger "Hosting" |
15 | 15 |
16 | 16 |
17 local Hosting = {} | 17 local Hosting = {} |
18 | |
19 | 18 |
20 function Hosting.push(domain,password,dir) | 19 function Hosting.push(domain,password,dir) |
21 local my_dir = Io.uri("file:"..dir) | 20 local my_dir = Io.uri("file:"..dir) |
22 my_dir.exists() or error("directory '"..dir.."' not found") | 21 my_dir.exists() or error("directory '"..dir.."' not found") |
23 my_dir.is_directory() or error("'"..dir.."' is not a directory") | 22 my_dir.is_directory() or error("'"..dir.."' is not a directory") |