osx - How to access finder sidebar shared content in cocoa -
i want access shared content of left sidebar of finder in mac, can system list connected same network. can access favorite content, not succeeded access.
i using code access favorite content of finder.
uint32 seed; lssharedfilelistref sflref = lssharedfilelistcreate(null, klssharedfilelistfavoriteitems, null); cfarrayref items = lssharedfilelistcopysnapshot( sflref, &seed ); for( size_t = 0; < cfarraygetcount(items); i++ ) { lssharedfilelistitemref item = (lssharedfilelistitemref)cfarraygetvalueatindex(items, i); if( !item ) continue; cfurlref outurl = null; lssharedfilelistitemresolve( item, klssharedfilelistnouserinteraction, (cfurlref*) &outurl, null ); if( !outurl ) continue; //the actual path string of item cfstringref itempath = cfurlcopyfilesystempath(outurl,kcfurlposixpathstyle); // todo: whatever want path here!!!! cfrelease(outurl); cfrelease(itempath); } cfrelease(items); cfrelease(sflref); since want access systems available in shared network change key according key in header file
/system/library/frameworks/coreservices.framework/frameworks/launchservices.framework/headers/lssharedfilelist.h
but nothing shared content. can me accessing this. time me in advance.
you can use klssharedfilelistrecentserveritems
connected network volumes.
Comments
Post a Comment