Skip to content

File Native

Spice
import "std/io/file_native";

Functions

openNewNativeFile

Spice
public f<byte*> openNewNativeFile(string path, short permissions)

Create a new file and open it for writing. Fails, if the path exists already.

Parameters

Name Type Description
path string Path of the new file
permissions short Permissions of the new file, without the bits, that the umask of the process clears

Returns: byte* — File pointer, or nil if the file could not be created