diff --git a/README.md b/README.md index c254240..4749eaf 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_521 TILs and counting..._ +_522 TILs and counting..._ --- @@ -112,6 +112,7 @@ _521 TILs and counting..._ - [Expose Internal Representation](elixir/expose-internal-representation.md) - [Include Captures With String.split](elixir/include-captures-with-string-split.md) - [List Functions For A Module](elixir/list-functions-for-a-module.md) +- [Listing Files In IEx](elixir/listing-files-in-iex.md) - [Pattern Matching In Anonymous Functions](elixir/pattern-matching-in-anonymous-functions.md) - [Quitting IEx](elixir/quitting-iex.md) - [Range Into List Using Comprehensions](elixir/range-into-list-using-comprehensions.md) diff --git a/elixir/listing-files-in-iex.md b/elixir/listing-files-in-iex.md new file mode 100644 index 0000000..697b57e --- /dev/null +++ b/elixir/listing-files-in-iex.md @@ -0,0 +1,20 @@ +# Listing Files In IEx + +When you start an IEx session, you do so in the context of some directory -- +the current working directory. This context can be important if you need to +do something like import a file. In fact, you may want to know what files +are available in the current working directory. + +You can list them all out within IEx using `ls/0`. + +```elixir +iex(1)> ls() + .git .gitignore README.md _build assets config + deps lib mix.exs mix.lock priv test + tmp +``` + +You can also list the contents of some other specific directory by naming it +when invoking `ls/1`. + +See `h()` within IEx for more details.