aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/Utils.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Utils.hx')
-rw-r--r--src/server/Utils.hx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/Utils.hx b/src/server/Utils.hx
index abce1c0..40fa282 100644
--- a/src/server/Utils.hx
+++ b/src/server/Utils.hx
@@ -1,10 +1,15 @@
package server;
+import sys.FileSystem;
import js.node.Https;
import js.node.Os;
class Utils {
+ public static function ensureDir(path:String):Void {
+ if (!FileSystem.exists(path)) FileSystem.createDirectory(path);
+ }
+
public static function getGlobalIp(callback:(ip:String)->Void):Void {
// untyped to skip second null argument for node < v10
Https.get(untyped "https://myexternalip.com/raw", r -> {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage