Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: coredata sql store on WebDAV mounted volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coredata sql store on WebDAV mounted volume



On May 18, 2006, at 11:29 AM, Jesse Grosjean wrote:

It seems that coredata sql stores can't be read or written from WebDAV volumes. It doesn't work with my app, or with the OutlineEdit demo app. Does anyone know of a workaround? If there is no work around what's the best way to test for this case so that I can give the user a more descriptive error message?

That is by design.

WebDAV is incapable of supporting non-atomic reads/writes. As such, there is no useful reason -- and many reasons not to -- store a SQLite database, through Core Data or otherwise, on a WebDAV based filesystem.

Use an XML or Binary store instead.

The following can be used to test FS type:

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

    struct statfs fsInfo;

    NSLog(@"Testing %s", argv[1]);
    if (statfs(argv[1],  &fsInfo) == -1) {
        NSLog(@"Error %s", argv[1]);
        exit(1);
    }

    if (fsInfo.f_flags & MNT_RDONLY) {
        NSLog(@"Read only %s", argv[1]);
        exit(0);
    }

    NSLog(@"Type %s", fsInfo.f_fstypename);

    [pool release];
    return 0;
}


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >coredata sql store on WebDAV mounted volume (From: Jesse Grosjean <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.