#import "NativeDevice.h"
#include <string.h>

@implementation NativeDevice

@end

extern "C"
{
	long long _NativeDeviceGetFreeDiskSpace(char* path)
	{
		NSDictionary *dict = [[NSFileManager defaultManager] fileSystemAttributesAtPath:[NSString stringWithUTF8String:path]];
    
		NSNumber *free = [dict valueForKey:@"NSFileSystemFreeSize"];
		
		return [free unsignedLongLongValue];	
	}

	bool _NativeDeviceGetIsLegitInstallation()
	{
		// Does it have an embedded mobile provision?
		return !![[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"];
	}
}