aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/Utils.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-06-03 14:32:02 +0300
committerRblSb <msrblsb@gmail.com>2020-06-03 14:32:02 +0300
commit6bb620cb803a6587dcbacc4a3360cbf3d75f3064 (patch)
tree93424d764d9922ab74617eb4793b5cc0ed6eec0d /src/server/Utils.hx
parentc1a044cf6c83dd87c81ad90ab0a4d10d2f74f67c (diff)
Event logs and log replay
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