Files
dough/dough-fs/src/jsMain/kotlin/gay/pizza/dough/fs/NodePath.kt
2023-09-05 15:55:05 -07:00

19 lines
601 B
Kotlin

package gay.pizza.dough.fs
import gay.pizza.dough.fs.nodefs.NodePathModule
class NodePath(override val fullPathString: String) : FsPath {
override val entityNameString: String
get() = NodePathModule.baseName(fullPathString)
override val parent: FsPath
get() = NodePath(fullPathString)
override val operations: FsOperations
get() = NodeFsOperations
override fun resolve(part: String): FsPath =
NodePath(NodePathModule.resolve(fullPathString, part))
override fun relativeTo(path: FsPath): FsPath =
NodePath(NodePathModule.relative(fullPathString, path.fullPathString))
}