Macaw OS C reference

Function savefile

#include <macawui.h>
void savefile(
    void (*fn)(const char *path),
    const char *dir,
    const char *name
);

Shows the Save dialog, for the person to choose a name and a folder. It asks first if the file is already there.

Parameters

fnvoid (*)(const char *path)
Your function, called with the whole path to save to.
dirconst char *
The folder it starts in, from your program's folder unless it starts with /. NULL for /home.
nameconst char *
The file name it suggests. NULL for "untitled".

In Dialogs, with alert, confirm, askstring, openfile, pickcolour.