on d452c09 help sign in
44 lines 718 B history raw
1### `++file`
3Simple file load
5Reads the value of a file located at `pax` and renders it as a
6[`++unit`]().
8Accepts
9-------
11`pax` is a [`++path`]().
13Produces
14--------
16The `++unit` of a [`++noun`]().
18Source
19------
21 ++ file :: simple file load
22 |= pax=path
23 ^- (unit)
24 =+ dir=((hard arch) .^(%cy pax))
25 ?~(q.dir ~ [~ .^(%cx pax)])
26 ::
28Examples
29--------
31 ~zod/try=> %/zak
32 ~zod/try=/zak> :ls %
33 ~zod/try=/zak> + %/mop 20
34 + /~zod/try/3/zak/mop
35 ~zod/try=/zak> :ls %
36 mop
37 ~zod/try=/zak> (file %/mop)
38 [~ 20]
39 ~zod/try=/zak> (file %/lak)
40 ~
41 ~zod/try=/zak> (file /==2%/mop)
42 ~