File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -472,6 +472,8 @@ Returns the result of the last evaluated expression of the input file. During in
472
472
a task-local include path is set to the directory containing the file. Nested calls to
473
473
`include` will search relative to that path. This function is typically used to load source
474
474
interactively, or to combine files in packages that are broken into multiple source files.
475
+ The argument `path` is normalized using [`normpath`](@ref) which will resolve
476
+ relative path tokens such as `..` and convert `/` to the appropriate path separator.
475
477
476
478
The optional first argument `mapexpr` can be used to transform the included code before
477
479
it is evaluated: for each parsed expression `expr` in `path`, the `include` function
Original file line number Diff line number Diff line change @@ -356,12 +356,16 @@ joinpath
356
356
"""
357
357
normpath(path::AbstractString) -> String
358
358
359
- Normalize a path, removing "." and ".." entries.
359
+ Normalize a path, removing "." and ".." entries and changing "/" to the canonical path separator
360
+ for the system.
360
361
361
362
# Examples
362
363
```jldoctest
363
364
julia> normpath("/home/myuser/../example.jl")
364
365
"/home/example.jl"
366
+
367
+ julia> normpath("Documents/Julia") == joinpath("Documents", "Julia")
368
+ true
365
369
```
366
370
"""
367
371
function normpath (path:: String )
You can’t perform that action at this time.
0 commit comments