Re: Determine if a file system supports files > 4GB
Re: Determine if a file system supports files > 4GB
- Subject: Re: Determine if a file system supports files > 4GB
- From: Jean-Daniel Dupas <email@hidden>
- Date: Mon, 12 Aug 2013 16:36:39 +0200
Le 12 août 2013 à 16:32, Jean-Daniel Dupas <email@hidden> a écrit :
>
> Le 12 août 2013 à 15:34, Dragan Milić <email@hidden> a écrit :
>
>> I'm trying to determine if a file system supports "big" files (> 4GB). For that I used to use File Manager API and FSGetVolumeParms() to get extended volume attributes and then check for bSupports2TBFiles. Since the File Manager API has been deprecated as of OS X 10.8, I want to replace all usage of it by other APIs, but I couldn't figure out how to get this particular information.
>>
>> Documentation suggests to replace FSGetVolumeParms() with -[NSURL getResourceValue:forKey:error:] at the Foundation level or with CFURLCopyResourcePropertyForKey() at the Core Foundation level. However, I couldn't find any key in NSURL/CFURL that would really provide the information I'm looking for.
>>
>> There are no suggestions what to use at the POSIX level. I checked out statfs(), but it seems it doesn't help either; no particular information about support for "big" files, neither in struct statfs type, nor in its f_flags field. I've found something that suggests solution in "mount.h" header, flag VFS_TBL64BITREADY, but I don't want to go low to kernel level and I still don't know whether "file system 64-bit readiness" really means support for "big" files.
>
> You are looking for getattrlist()
>
> Search for VOL_CAP_FMT_2TB_FILESIZE in the man page ("If this bit is set the volume format supports file sizes larger than 4GB").
>
That said, if you don't want to drop down to the POSIX API, CFURL also provide a kCFURLVolumeMaximumFileSizeKey which look suited to your need.
-- Jean-Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden