this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

CoreServices: Implement FSDeleteObject()

+13
+12
src/frameworks/CoreServices/FileManager.cpp
··· 123 123 return false; 124 124 } 125 125 126 + OSStatus FSDeleteObject(const FSRef* fsref) 127 + { 128 + std::string path; 129 + if (FSRefMakePath(fsref, path)) 130 + { 131 + if (::unlink(path.c_str()) == -1) 132 + return makeOSStatus(errno); 133 + return noErr; 134 + } 135 + return fnfErr; 136 + } 137 + 126 138 OSStatus FSRefMakePath(const FSRef* fsref, uint8_t* path, uint32_t maxSize) 127 139 { 128 140 std::string rpath;
+1
src/frameworks/CoreServices/include/CoreServices/FileManager.h
··· 216 216 Boolean CFURLGetFSRef(CFURLRef urlref, struct FSRef* fsref); // in CF 217 217 CFURLRef CFURLCreateFromFSRef(CFAllocatorRef alloc, struct FSRef* location); // --> in CF 218 218 OSStatus FSFindFolder(long vRefNum, OSType folderType, Boolean createFolder, struct FSRef* location); 219 + OSStatus FSDeleteObject(const FSRef* fsref); 219 220 220 221 OSStatus FSGetCatalogInfo(const FSRefPtr ref, uint32_t infoBits, struct FSCatalogInfo* infoOut, struct HFSUniStr255* nameOut, FSSpecPtr fsspec, FSRefPtr parentDir); 221 222