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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -