This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extend NSWorkspace and add a method to test if the volume is a network mount | |
@implementation NSWorkspace (Extras) | |
- (BOOL)checkForNetworkMountAtPath:(NSString*)path { | |
struct statfs stat; | |
int err = statfs([path fileSystemRepresentation], &stat); | |
if (err == 0) | |
{ | |
return !(stat.f_flags & MNT_LOCAL); | |
} | |
return NO; |