I'm trying to create a log file at the start of my program.
I need to check if a /log
directory exists if it doesn't create the directory then move on to creating the log file.
Well I tried to use os.Mkdir
(as well as os.MkdirAll
), but no matter what value I put into the second parameter I get a locked out folder with no permissions. What value should this be in order to get a read / write for user folder? I thought it would be 0x700
but it doesn't seem to work.
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…