diff options
| author | marcellus <msimon_fr@hotmail.com> | 2025-04-14 18:00:23 +0200 |
|---|---|---|
| committer | marcellus <msimon_fr@hotmail.com> | 2025-04-14 18:00:23 +0200 |
| commit | ec8b70c184b847f886e63f9718a9cb1329ae71d2 (patch) | |
| tree | 75fb15602be9d400e3395a12456c91672a7f0357 /.obsidian/plugins/obsidian-enhancing-export/lua/polyfill.lua | |
| parent | 51584e1fe07456a01dc14504b214d068c62e8fe6 (diff) | |
chore: rm-d .obsidian
Diffstat (limited to '.obsidian/plugins/obsidian-enhancing-export/lua/polyfill.lua')
| -rwxr-xr-x | .obsidian/plugins/obsidian-enhancing-export/lua/polyfill.lua | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/.obsidian/plugins/obsidian-enhancing-export/lua/polyfill.lua b/.obsidian/plugins/obsidian-enhancing-export/lua/polyfill.lua deleted file mode 100755 index 1e8f3e5..0000000 --- a/.obsidian/plugins/obsidian-enhancing-export/lua/polyfill.lua +++ /dev/null @@ -1,61 +0,0 @@ -os.platform = nil -if os.platform == nil then - local libExt = package.cpath:match("%p[\\|/]?\\.%p(%a+)") - if libExt == 'dll' then - os.platform = "Windows" - elseif libExt == 'so' then - os.platform = "Linux" - elseif libExt == 'dylib' then - os.platform = "MacOS" - end -end - - -os.copy = function(src, dest) - if os.platform == "Windows" then - src = string.gsub(src, "/", "\\") - src = os.text.toencoding(src) - dest = os.text.toencoding(dest) - os.execute('copy "' .. src .. '" "' .. dest .. '" >NUL') - else - os.execute('cp "' .. src .. '" "' .. dest .. '"') - end -end - -os.mkdir = function(dir) - if os.exists(dir) then - return - end - if os.platform == "Windows" then - dir = os.text.toencoding(dir) - os.execute('mkdir "' .. dir .. '"') - else - os.execute('mkdir -p "' .. dir .. '"') - end -end - -os.exists = function(path) - if os.platform == "Windows" then - path = string.gsub(path, "/", "\\") - path = os.text.toencoding(path) - local _, _, code = os.execute('if exist "' .. path .. '" (exit 0) else (exit 1)') - return code == 0 - else - local _, _, code = os.execute('test -e "' .. path .. '"') - return code == 0 - end -end - -string.starts_with = function(str, start) - return str:sub(1, #start) == start -end - -string.ends_with = function(str, ending) - return ending == "" or str:sub(-#ending) == ending -end - - -return { - os = os, - string = string -}
\ No newline at end of file |
