mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-20 13:58:47 +08:00
Add information on __DIR__ and __ENV__
This commit is contained in:
parent
3e10a8fd18
commit
bd47169892
1 changed files with 10 additions and 0 deletions
|
@ -41,6 +41,16 @@ return the Elixir version.
|
|||
Note you can also press <kbd>tab</kbd> to cycle across the completion
|
||||
alternatives.
|
||||
|
||||
## Getting the current directory
|
||||
|
||||
You can access the location of the current `.livemd` file and
|
||||
its current directory using `__ENV__` and `__DIR__` variables:
|
||||
|
||||
```elixir
|
||||
IO.puts(__ENV__.file)
|
||||
IO.puts(__DIR__)
|
||||
```
|
||||
|
||||
## Runtimes
|
||||
|
||||
Livebook has a concept of **runtime**, which in practice is an Elixir node responsible
|
||||
|
|
Loading…
Reference in a new issue