Search code examples
crystal-lang

Crystal lang : concat path in a cross-platform way?


Unix uses / to separate folders but Windows uses \, so I wonder a safe way for cross-platform to concat two paths like /tmp/ + temp_file.xxx.


Solution

  • Just after a minute, I found the answer, File.join (-_-)