Bosatsu/IO/Core

source code: - test_workspace/Bosatsu/IO/Core.bosatsu

public dependencies: Bosatsu/IO/Bytes, Bosatsu/IO/Error, Bosatsu/Prog

Index

Types

Duration

type Duration

FileKind

type FileKind

Constructors

  • Dir
  • File
  • Other
  • Symlink

FileStat

type FileStat

Constructors

  • FileStat(kind: FileKind, size_bytes: Int, mtime: Instant)

Handle

type Handle

Instant

Opaque outside this package because constructors are not exported.

type Instant

OpenMode

type OpenMode

Constructors

  • Append
  • CreateNew
  • Read
  • WriteTruncate

Path

Opaque outside this package because constructor is not exported.

type Path

Process

type Process

SpawnResult

type SpawnResult

Constructors

  • SpawnResult(proc: Process, stdin: Option[Handle], stdout: Option[Handle], stderr: Option[Handle])

Stdio

type Stdio

Constructors

  • Inherit
  • Null
  • Pipe
  • UseHandle(handle: Handle)

StdioConfig

type StdioConfig

Constructors

  • StdioConfig(stdin: Stdio, stdout: Stdio, stderr: Stdio)

TempFile

type TempFile

Constructors

  • TempFile(path: Path, handle: Handle)

Values

close

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Handle, Unit

def close(h: Handle) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, ()]

copy_bytes

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Handle, Int, Option

def copy_bytes(src: Handle, dst: Handle, chunk_size: Int, max_total: Option[Int]) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Int]

create_temp_dir

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Option, Path, String

def create_temp_dir(dir: Option[Path], prefix: String) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Path]

create_temp_file

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Option, Path, String, TempFile

def create_temp_file(dir: Option[Path], prefix: String, suffix: String) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, TempFile]

duration_to_nanos

references: Duration, Int

def duration_to_nanos(d: Duration) -> Int

flush

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Handle, Unit

def flush(h: Handle) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, ()]

get_env

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Option, String

def get_env(name: String) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Option[String]]

list_dir

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, List, Path

def list_dir(path: Path) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, List[Path]]

mkdir

references: Bool, Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Path, Unit

def mkdir(path: Path, recursive: Bool) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, ()]

now_mono

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Duration

now_mono: Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Duration]

now_wall

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Instant

now_wall: Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Instant]

open_file

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Handle, OpenMode, Path

def open_file(path: Path, mode: OpenMode) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Handle]

path_file_name

references: Option, Path, String

def path_file_name(path: Path) -> Option[String]

path_join

references: Path

def path_join(base: Path, child: Path) -> Path

path_parent

references: Option, Path

def path_parent(path: Path) -> Option[Path]

path_sep

references: String

path_sep: String

path_to_String

references: Path, String

def path_to_String(path: Path) -> String

read_all_bytes

references: Bosatsu/IO/Bytes::Bytes, Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Handle, Int

def read_all_bytes(h: Handle, chunk_size: Int) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Bosatsu/IO/Bytes::Bytes]

read_bytes

references: Bosatsu/IO/Bytes::Bytes, Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Handle, Int, Option

def read_bytes(h: Handle, max_bytes: Int) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Option[Bosatsu/IO/Bytes::Bytes]]

read_utf8

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Handle, Int, Option, String

def read_utf8(h: Handle, max_chars: Int) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Option[String]]

remove

references: Bool, Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Path, Unit

def remove(path: Path, recursive: Bool) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, ()]

rename

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Path, Unit

def rename(from: Path, to: Path) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, ()]

sleep

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Duration, Unit

def sleep(d: Duration) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, ()]

spawn

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, List, SpawnResult, StdioConfig, String

def spawn(cmd: String, args: List[String], stdio: StdioConfig) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, SpawnResult]

stat

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, FileStat, Option, Path

def stat(path: Path) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Option[FileStat]]

stderr

references: Handle

stderr: Handle

stdin

references: Handle

stdin: Handle

stdout

references: Handle

stdout: Handle

string_to_Path

references: Option, Path, String

def string_to_Path(s: String) -> Option[Path]

wait

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Int, Process

def wait(p: Process) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, Int]

write_bytes

references: Bosatsu/IO/Bytes::Bytes, Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Handle, Unit

def write_bytes(h: Handle, bytes: Bosatsu/IO/Bytes::Bytes) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, ()]

write_utf8

references: Bosatsu/IO/Error::IOError, Bosatsu/Prog::Prog, Handle, String, Unit

def write_utf8(h: Handle, s: String) -> Bosatsu/Prog::Prog[Bosatsu/IO/Error::IOError, ()]