src/lsp/files/disk.bend relies on unsafe/foreign
raw source on the hub · import bolt@1.18.0.0/src/lsp/files/disk.bend as Disk
files/disk: the real file system. Reads bytes and decodes them itself, as a chunk may end inside a UTF-8 char.
4 imports
import Base import ./service.bend as S import ../frame.bend as Frame import ../../walk/disk.bend as WalkDisk
Definitions
def slurp.end source · line 8 · raw
@file:File -> @acc:List<&2, U32> -> IO(Maybe<&2, String>)
def slurp.cut source · line 13 · raw
@bytes:List<&2, U32> -> @file:File -> @acc:List<&2, U32> -> @rest:(@_:File -> @_:List<&2, U32> -> IO(Maybe<&2, String>)) -> IO(Maybe<&2, String>)
def slurp.more source · line 25 · raw
@rr:Result<&1, &1, Pair(U32, String), List<&2, U32>> -> @file:File -> @acc:List<&2, U32> -> @rest:(@_:File -> @_:List<&2, U32> -> IO(Maybe<&2, String>)) -> IO(Maybe<&2, String>)
def slurp.next source · line 37 · raw
@got:Pair(File, Result<&1, &1, Pair(U32, String), List<&2, U32>>) -> @acc:List<&2, U32> -> @rest:(@_:File -> @_:List<&2, U32> -> IO(Maybe<&2, String>)) -> IO(Maybe<&2, String>)
def slurp source · line 46 · raw
@fuel:Nat -> @file:File -> @acc:List<&2, U32> -> IO(Maybe<&2, String>)
the whole file, read in chunks until one is empty, or the fuel is
def read.opened source · line 55 · raw
@rr:Result<&1, &1, Pair(U32, String), File> -> IO(Maybe<&2, String>)
def read source · line 63 · raw
@path:String -> IO(Maybe<&2, String>)
a file's text, or None when it cannot be opened
def base_path.of source · line 68 · raw
@rr:Result<&1, &1, Pair(U32, String), String> -> IO(String)
def base_path source · line 76 · raw
@_u:Unit -> IO(String)
Base, where bend's installer puts it
def cwd source · line 82 · raw
@_u:Unit -> IO(String)
the working directory, as the lint's walk names it
def new source · line 86 · raw
0x35f17b35555be5fc1e2ec2480b52b92a/src/lsp/files/service.Files
the real file system