added functions

This commit is contained in:
Scott Graves 2022-07-29 16:08:38 -05:00
parent 272444e83d
commit a4f6519b84
2 changed files with 15 additions and 3 deletions

View File

@ -0,0 +1,11 @@
local M = {}
function M.iff(b, l, r)
if b then
return l
end
return r
end
return M

View File

@ -1,12 +1,13 @@
require("nvim-goodies.string") require("nvim-goodies.string")
local g = require("nvim-goodies")
local os = require("nvim-goodies.os") local os = require("nvim-goodies.os")
local scan = require("plenary.scandir")
local path = require("plenary.path") local path = require("plenary.path")
local scan = require("plenary.scandir")
local M = {} local M = {}
M.directory_sep = M.iff(os.is_windows, "\\\\", "/") M.directory_sep = g.iff(os.is_windows, "\\\\", "/")
M.not_directory_sep = M.iff(os.is_windows, "/", "\\\\") M.not_directory_sep = g.iff(os.is_windows, "/", "\\\\")
function M.create_path(...) function M.create_path(...)
local ret = local ret =