mirror of
https://github.com/GayPizzaSpecifications/dough.git
synced 2025-08-17 20:01:32 +00:00
dough-core and all of that
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
package gay.pizza.dough.fs
|
||||
|
||||
import gay.pizza.dough.core.time.UnixTime
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
|
||||
interface FsOperations {
|
||||
fun exists(path: FsPath): Boolean
|
||||
|
||||
fun isDirectory(path: FsPath): Boolean
|
||||
fun isRegularFile(path: FsPath): Boolean
|
||||
fun isSymbolicLink(path: FsPath): Boolean
|
||||
@ -12,6 +14,8 @@ interface FsOperations {
|
||||
fun isWritable(path: FsPath): Boolean
|
||||
fun isExecutable(path: FsPath): Boolean
|
||||
|
||||
fun lastModified(path: FsPath): UnixTime
|
||||
|
||||
fun list(path: FsPath): Sequence<FsPath>
|
||||
|
||||
fun walk(path: FsPath): Sequence<FsPath>
|
||||
|
@ -0,0 +1,8 @@
|
||||
package gay.pizza.dough.fs
|
||||
|
||||
interface FsProvider {
|
||||
val currentWorkingDirectory: FsPath
|
||||
val operations: FsOperations
|
||||
|
||||
fun resolve(path: String): FsPath
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
package gay.pizza.dough.fs
|
||||
|
||||
expect fun FsPath(path: String): FsPath
|
||||
expect val PlatformFsProvider: FsProvider
|
||||
|
Reference in New Issue
Block a user