File::isOnRemovableDrive() implementation


#1

Hi Julian,
I got the juce code checked out from the tip. You have not implemented isOnRemovableDrive().
We had discussed it in other thread too

http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?p=16951&highlight=#16951

I have my implementation of the method which is working fine. I need to thank Justin for this.

bool File::isOnRemovableDrive() const throw()
{
	BOOL returnValue;
	const ScopedAutoReleasePool pool;
     
	[[NSWorkspace sharedWorkspace] getFileSystemInfoForPath: juceStringToNS (getFullPathName()) 
									isRemovable:&returnValue  
									isWritable:nil 
									isUnmountable:nil 
									description:nil 
									type:nil];
    return returnValue;
}

you can give this code a try.


#2

Thanks - I had it on my to-do-list, but that code looks pretty good, I’ll give it a spin…