~/bend-docscommunity

src/lsp/files/service.bend checks

raw source on the hub · import 0xd96f2ab40f5df4925c42e96d0ba857ff/src/lsp/files/service.bend as Service

files: an effect service: a file's text by path, where Base lives, and the working directory a relative path is read against.

1 import
import Base

Types

type Files source · line 6 · raw

Type

effect service: a file's text, where Base is, and the working directory

Definitions

def read source · line 10 · raw

@ff:Files -> @path:String -> IO(Maybe<&2, String>)

None when the file cannot be read

def base_path source · line 15 · raw

@ff:Files -> IO(String)

the path of Base, from a files service

def cwd source · line 20 · raw

@ff:Files -> IO(String)

the working directory, from the root; "" when it cannot be named

Templates

template read_all source · line 25 · raw

@-ff:Files -> @paths:List<&2, String> -> IO(List<&2, Maybe<&2, String>>)

every path read, in order (a missing file is a None)