By quickly searching, this is the only API in Swift that can create file with open(2) (via _CFOpenFileWithMode(),) however there are no way to control this permission value. Therefore, in Swift we can’t create file with regular permission using umask. Surprise!