From 9141ae99caf7fc83e2d3ac1e1618633049f65621 Mon Sep 17 00:00:00 2001 From: luozhiya Date: Thu, 13 Feb 2025 19:04:48 +0800 Subject: [PATCH] c 62 --- lua/fittencode/functional/forbidden_chars.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/fittencode/functional/forbidden_chars.lua diff --git a/lua/fittencode/functional/forbidden_chars.lua b/lua/fittencode/functional/forbidden_chars.lua new file mode 100644 index 0000000..839c3f5 --- /dev/null +++ b/lua/fittencode/functional/forbidden_chars.lua @@ -0,0 +1,23 @@ +-- Windows禁止的文件名字符 +local windows_forbidden_chars = { + ['<'] = true, + ['>'] = true, + -- [":"] = true, + ['\"'] = true, + ['/'] = true, + -- ["\\"] = true, + ['|'] = true, + ['?'] = true, + ['*'] = true +} + +-- Linux禁止的文件名字符(主要为路径分隔符) +local linux_forbidden_chars = { + -- ["/"] = true +} + +-- Linux中不推荐使用的文件名字符(虽然不是严格禁止,但可能会导致命令行解析错误) +local linux_unrecommended_chars = { + ['\0'] = true, -- 空字符 + ['\n'] = true -- 换行符 +}