Home

main

  • Dir
    • create!
    • list_files!
    • list_files_recursively!
    • list_dirs!
  • File
    • content!
    • content_bytes!
    • create!
    • create_bytes!
    • tmp_name!
    • create_tmp!
    • create_bytes_tmp!
    • delete!
  • Path
    • basename!
    • realpath!
    • dirname!
  • Process
    • run!
    • run_with_stdin!
    • Program
    • ProcessRunResult
      • is_eq
      • stdout
      • stderr
      • success
      • success_and_stderr_empty
      • exit_write_to_stderr!
      • message_with_stderr
  • Restricted
    • restrict!
    • SystemOperation
    • PathPermission
    • PathAccess
  • Script
    • stdin_provided_else_exit!
    • provided_else_exit!
  • Stderr
    • write!
    • writeln!
    • write_bytes!
  • Stdin
    • lines!
    • bytes!
    • is_tty!
  • Stdout
    • write!
    • writeln!
    • write_bytes!
  • Dir.create! : { absolute_path : Str } => Try({}, [DirCreateErr(Str)])
  • Dir.list_files! : { absolute_path : Str } => Try(List(Str), [DirReadErr(Str)])
  • Dir.list_files_recursively! : { absolute_path : Str } => Try(List(Str), [DirReadErr(Str)])
  • Dir.list_dirs! : { absolute_path : Str } => Try(List(Str), [DirReadErr(Str)])
  • File.content! : { absolute_path : Str } => Try(Str, [FileReadErr(Str)])
  • File.content_bytes! : { absolute_path : Str } => Try(List(U8), [FileReadErr(Str)])
  • File.create! : { absolute_path : Str, content : Str } => Try({}, [FileCreateErr(Str)])
  • File.create_bytes! : { absolute_path : Str, byte_content : List(U8) } => Try({}, [FileCreateErr(Str)])
  • File.tmp_name! : { name : Str, extension : Str } => Try(Str, [FileTmpNameErr(Str)])
  • File.create_tmp! : { name : Str, extension : Str, content : Str } => Try(Str, [TmpFileCreateErr(Str)])
  • File.create_bytes_tmp! : { name : Str, extension : Str, bytes_content : List(U8) } => Try(Str, [TmpFileCreateErr(Str)])
  • File.delete! : { absolute_path : Str } => Try({}, [FileDeleteErr(Str)])
  • Path.basename! : Str => Try(Str, [PathErr(Str)])
  • Path.realpath! : Str => Try(Str, [PathErr(Str)])
  • Path.dirname! : Str => Try(Str, [PathErr(Str)])
  • Process.run! : Program => Try(ProcessRunResult, [ProcessRunErr(Str)])
  • Process.run_with_stdin! : Program, Str => Try(ProcessRunResult, [ProcessRunErr(Str), OutOfBounds])
  • Process.Program := { bin : Str, args : Str ?? "" }
  • Process.ProcessRunResult := { exit_code : U8, stdout : List(U8), stderr : List(U8) }
  • Process.ProcessRunResult.is_eq : _
  • Process.ProcessRunResult.stdout : ProcessRunResult -> Str
  • Process.ProcessRunResult.stderr : ProcessRunResult -> Str
  • Process.ProcessRunResult.success : ProcessRunResult, { error_message : Str } -> Try(ProcessRunResult, (ProcessRunResult, Str))
  • Process.ProcessRunResult.success_and_stderr_empty : ProcessRunResult, { error_message : Str } -> Try(ProcessRunResult, (ProcessRunResult, Str))
  • Process.ProcessRunResult.exit_write_to_stderr! : ProcessRunResult, Str => Try({}, [Exit(I32), StderrErr(Str)])
  • Process.ProcessRunResult.message_with_stderr : ProcessRunResult, { error_message : Str } -> Str
  • Restricted.restrict! : List(SystemOperation), List(SystemOperation), List(PathAccess) => Try({}, [RestrictErr(Str)])
  • Restricted.SystemOperation : [StdinStdoutStderrAndBasicFunctionality, ReadFromFilesystem, WriteToFilesystem, CreateAndRemoveOnFilesystem, SpecialCreateAndRemoveOnFilesystem, Networking, NetworkingMulticast, FileAttributeModifiaction, ChangeFileOwnership, FileLocking, Unix, DNS, GetPassword, SendFileDescriptors, ReceivingFileDescriptors, TapeDrives, TTY, ProcessRelation, Execute, ProtectionExecute, SetTime, Processes, VirtualMemoryInfo, ChangeRightsOfAProcess, PacketFiltering, InspectionRoutingTable, ChangeRoutingTable, Audio, Video, BerkeleyPacketFiltering, Error]
  • Restricted.PathPermission : [Read, Write, Execute, CreateAndRemove]
  • Restricted.PathAccess : { path : Str, permissions : List(PathPermission) }
  • Script.stdin_provided_else_exit! : { message : Str } => Try({}, [StdinTTYErr(Str), StderrErr(Str), Exit(I32)])
  • Script.provided_else_exit! : { min_number_of_args : U8, message : Str, args : List(Str) } => Try({}, [StderrErr(Str), Exit(I32)])
  • Stderr.write! : Str => Try({}, [StderrErr(Str)])
  • Stderr.writeln! : Str => Try({}, [StderrErr(Str)])
  • Stderr.write_bytes! : List(U8) => Try({}, [StderrErr(Str)])
  • Stdin.lines! : () => Try(List(Str), [StdinErr(Str)])
  • Stdin.bytes! : () => Try(List(U8), [StdinErr(Str)])
  • Stdin.is_tty! : () => Try(Bool, [StdinTTYErr(Str)])
  • Stdout.write! : Str => Try({}, [StdoutErr(Str)])
  • Stdout.writeln! : Str => Try({}, [StdoutErr(Str)])
  • Stdout.write_bytes! : List(U8) => Try({}, [StdoutErr(Str)])

Made by people who like to make nice things.