Expand Path
- expand
- ~
some_path = "~/work"
path = Path[some_path].expand(home: true)
puts path
puts Path["~/other"].expand(home: true)
puts Path["~/other"].expand
/home/gabor/work
/home/gabor/other
/home/gabor/work/slides/crystal/~/other
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
some_path = "~/work"
path = Path[some_path].expand(home: true)
puts path
puts Path["~/other"].expand(home: true)
puts Path["~/other"].expand
/home/gabor/work
/home/gabor/other
/home/gabor/work/slides/crystal/~/other