bf6 path:split

This commit is contained in:
voidlizard 2025-06-20 08:36:02 +03:00
parent c5dd315ab5
commit b28e669049
2 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,6 @@ BINS := \
hbs2 \ hbs2 \
hbs2-peer \ hbs2-peer \
hbs2-keyman \ hbs2-keyman \
git-remote-hbs2 \
hbs2-cli \ hbs2-cli \
hbs2-sync \ hbs2-sync \
fixme-new \ fixme-new \

View File

@ -2216,6 +2216,10 @@ internalEntries = do
_ -> pure nil _ -> pure nil
entry $ bindMatch "path:split" $ \case
[ StringLike p ] -> pure $ mkList (fmap mkStr (splitPath p))
_ -> throwIO $ BadFormException @c nil
entry $ bindMatch "path:exists?" $ \case entry $ bindMatch "path:exists?" $ \case
[ StringLike p ] -> lift do [ StringLike p ] -> lift do
liftIO (Dir.doesPathExist p) <&> mkBool liftIO (Dir.doesPathExist p) <&> mkBool