mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Change directory creation API call for MacOS.
This commit is contained in:
@@ -64,7 +64,8 @@ void Timestamps(const char* path)
|
||||
int32_t count;
|
||||
HFileInfo* fpb;
|
||||
CInfoPBRec cipbr;
|
||||
char message[300];
|
||||
char message[300];
|
||||
HParamBlockRec dirPB;
|
||||
|
||||
snprintf((char*)str255, 255, "%s", path);
|
||||
hpb.ioNamePtr = str255;
|
||||
@@ -78,13 +79,23 @@ void Timestamps(const char* path)
|
||||
}
|
||||
refNum = hpb.ioVRefNum;
|
||||
|
||||
rc = DirCreate(refNum, fsRtDirID, (unsigned char*)"\pTIMES", &dirId);
|
||||
memset(&dirPB, 0, sizeof(HParamBlockRec));
|
||||
|
||||
dirPB.fileParam.ioCompletion = 0; // Nothing, sync
|
||||
dirPB.fileParam.ioVRefNum = refNum; // Volume specification
|
||||
dirPB.fileParam.ioNamePtr = (StringPtr) "\pTIMES"; // Directory name to create
|
||||
dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume
|
||||
|
||||
rc = PBDirCreate(&dirPB, 0);
|
||||
|
||||
if(rc)
|
||||
{
|
||||
printf("Error %d creating working directory.\n", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
dirId = dirPB.fileParam.ioDirID;
|
||||
|
||||
printf("Creating timestamped files.\n");
|
||||
|
||||
rc = HCreate(refNum, dirId, "\pMAXCTIME", ostUnknown, ftGenericDocumentPC);
|
||||
|
||||
Reference in New Issue
Block a user