> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/u/unix/ls.md).

# Ls

Explicit, by opening the current working directory:

```ruby
var content = []
Dir.cwd.open.each { |file|
    file ~~ < . .. > && next
    content.append(file)
}
 
content.sort.each { |file|
    say file
}
```

Implicit, by using the *String.glob* method:

```ruby
'*'.glob.each { |file|
    say file
}
```
