/// <summary>Open the specified File for write access, ensuring that it does not exist. /// </summary> /// <param name="f">the file that we want to create</param> /// <param name="permissions">we want to have on the file (if security is enabled)</param> /// <exception cref="AlreadyExistsException">if the file already exists</exception> /// <exception cref="System.IO.IOException">if any other error occurred</exception> public static FileOutputStream CreateForWrite(FilePath f, int permissions) { if (skipSecurity) { return(InsecureCreateForWrite(f, permissions)); } else { return(NativeIO.GetCreateForWriteFileOutputStream(f, permissions)); } }