Beispiel #1
0
void test_createresfile(void)
{
    OSErr err;

    FSDelete(fname, 0);
    CreateResFile(fname);
    if ( (err = ResError()) != 0) {
        fprintf(stderr, "CreateResFile failed (File does not exist): %d\n", err);
        exit(1);
    }

    // Verify it does fail if the file/fork already exist.
    CreateResFile(fname);
    if ( (err = ResError()) != dupFNErr) {
        fprintf(stderr, "CreateResFile (File/Fork exist) failed: %d\n", err);
        exit(2);
    }

    // Verify it doesn't fail if the file exists w/o a resource fork.
    FSDelete(fname, 0);
    Create(fname, 0, 'TEST', 'BINA');
    CreateResFile(fname);
    if ( (err = ResError()) != 0) {
        fprintf(stderr, "CreateResFile (File exists) failed: %d\n", err);
        exit(2);
    }

    FSDelete(fname, 0);


}
Beispiel #2
0
int CSkeletalFrame::BinLoad(void)
{
	return CreateResFile();
}