mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
20 lines
408 B
Go
20 lines
408 B
Go
package tools
|
|
|
|
import (
|
|
"regexp"
|
|
|
|
fstools "github.com/sipeed/picoclaw/pkg/tools/fs"
|
|
)
|
|
|
|
func validatePathWithAllowPaths(
|
|
path, workspace string,
|
|
restrict bool,
|
|
patterns []*regexp.Regexp,
|
|
) (string, error) {
|
|
return fstools.ValidatePathWithAllowPaths(path, workspace, restrict, patterns)
|
|
}
|
|
|
|
func isAllowedPath(path string, patterns []*regexp.Regexp) bool {
|
|
return fstools.IsAllowedPath(path, patterns)
|
|
}
|