# Readdir return full path

**URL:** <https://discourse.julialang.org/t/readdir-return-full-path/15274>\
**Category:** Internals & Design\
**Tags:** proposal\
**Created:** [September 21, 2018, 12:57pm UTC](https://discourse.julialang.org/t/readdir-return-full-path/15274 "2018-09-21T12:57:47Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![piever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piever/32/1815_2.png) [@piever](https://discourse.julialang.org/u/piever)\
**Post date:** [August 21, 2019, 10:12am UTC](https://discourse.julialang.org/t/readdir-return-full-path/15274/21 "2019-08-21T10:12:56Z")

</div>

Just wanted to mention that there is a [Glob](https://github.com/vtjnash/Glob.jl/) package that can be used to read directories and do some filtering as well:

```julia
julia> using Glob

julia> glob("*.csv", path_to_dir) # glob("*", path_to_dir) to list all files

```

which returns an array of full paths: I generally find it handier than a manual `readdir`, `filter` and `joinpath`.

Maybe one reason why `readdir` does not join the path by default is that it makes filtering the file list easier before joining the rest of the path.

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [April 12, 2021, 11:53am UTC](https://discourse.julialang.org/t/readdir-return-full-path/15274/22 "2021-04-12T11:53:44Z")

</div>

Just to let people know this is part of Base now:

```julia
readdir(dir::AbstractString=pwd();
      join::Bool = false, # <-- HERE
      sort::Bool = true,
  ) -> Vector{String}

```

[Previous page](https://discourse.julialang.org/t/readdir-return-full-path/15274.md?page=1)
