feat: add query param to include dir path in query

This commit is contained in:
2025-12-05 00:38:05 +00:00
parent 1bedafd3de
commit 3ea12cf51a
4 changed files with 64 additions and 10 deletions

View File

@@ -434,7 +434,7 @@ func (vfs *VirtualFS) AbsolutePath(ctx context.Context, db bun.IDB, node *Node)
if !node.IsAccessible() {
return "", ErrNodeNotFound
}
return buildNodeAbsolutePath(ctx, db, node)
return buildNodeAbsolutePathString(ctx, db, node)
}
func (vfs *VirtualFS) PermanentlyDeleteNode(ctx context.Context, db bun.IDB, node *Node) error {
@@ -564,3 +564,10 @@ func (vfs *VirtualFS) generatePublicID() (string, error) {
n := binary.BigEndian.Uint64(b[:])
return vfs.sqid.Encode([]uint64{n})
}
func (vfs *VirtualFS) RealPath(ctx context.Context, db bun.IDB, node *Node) (Path, error) {
if !node.IsAccessible() {
return nil, ErrNodeNotFound
}
return buildNoteAbsolutePath(ctx, db, node)
}