feat: fuzzy file open

This commit is contained in:
Adam
2025-09-24 12:40:54 -05:00
parent d3b6545e7c
commit f589fc2327
4 changed files with 75 additions and 36 deletions

View File

@@ -3,6 +3,11 @@ export function getFilename(path: string) {
return parts[parts.length - 1]
}
export function getDirectory(path: string) {
const parts = path.split("/")
return parts.slice(0, parts.length - 1).join("/")
}
export function getFileExtension(path: string) {
const parts = path.split(".")
return parts[parts.length - 1]