ruby - How to create a directory with a slash '/' in its name -
for example, want create folder named "ac/dc"
. should do?
dir.mkdir("ac/dc")
will give error message this
in `mkdir': no such file or directory @ dir_s_mkdir - ac/dc (errno::enoent)
have considered using alternative unicode character instead of standard forward slash?
perhaps use:
'fullwidth solidus' (u+ff0f) http://www.fileformat.info/info/unicode/char/ff0f/index.htm
dir.mkdir("ac/dc")
or
'division slash' (u+2215) http://www.fileformat.info/info/unicode/char/2215/index.htm
dir.mkdir("ac∕dc")
Comments
Post a Comment