std/os/dir▲toc

Directory operations.

.

fun copy-directory( dir : pathstd/os/path/path: V, to : pathstd/os/path/path: V ) : <purestd/core/pure: E,fsysstd/core/fsys: X> ()
fun copy-file( from : pathstd/os/path/path: V, to : pathstd/os/path/path: V, preserve-mtime : ? boolstd/core/types/bool: V ) : <exnstd/core/exn/exn: (E, V) -> V,fsysstd/core/fsys: X> ()

Copy a file.

fun copy-file-to-dir( from : pathstd/os/path/path: V, dir : pathstd/os/path/path: V ) : <exnstd/core/exn/exn: (E, V) -> V,fsysstd/core/fsys: X> ()

Copy a file to a directory.

fun ensure-dir( dir : pathstd/os/path/path: V ) : <exnstd/core/exn/exn: (E, V) -> V,fsysstd/core/fsys: X> ()

Ensure a directory path exists.

fun is-directory( dir : pathstd/os/path/path: V ) : fsysstd/core/fsys: X boolstd/core/types/bool: V

Is the path a valid directory?

fun is-file( path : pathstd/os/path/path: V ) : fsysstd/core/fsys: X boolstd/core/types/bool: V

Is the path a valid file?

fun list-directory( dir : pathstd/os/path/path: V ) : fsysstd/core/fsys: X liststd/core/types/list: V -> V<pathstd/os/path/path: V>

List directory contents (excluding . and ..). Returns a list of full paths (not just the names in the directory).

fun list-directory-recursive( dir : pathstd/os/path/path: V, max-depth : ? intstd/core/types/int: V ) : <divstd/core/types/div: X,fsysstd/core/fsys: X> liststd/core/types/list: V -> V<pathstd/os/path/path: V>

Recursively list all the entries under a directory.

private import std/core/typesstd/core/types, std/core/hndstd/core/hnd, std/core/exnstd/core/exn, std/core/boolstd/core/bool, std/core/orderstd/core/order, std/core/charstd/core/char, std/core/intstd/core/int, std/core/vectorstd/core/vector, std/core/stringstd/core/string, std/core/sslicestd/core/sslice, std/core/liststd/core/list, std/core/maybestd/core/maybe, std/core/eitherstd/core/either, std/core/tuplestd/core/tuple, std/core/showstd/core/show, std/core/debugstd/core/debug, std/core/delayedstd/core/delayed, std/core/consolestd/core/console, std/corestd/core, std/os/pathstd/os/path