[swift-corelibs-dev] Implementing HTTPCookieStorage

Tony Parker anthony.parker at apple.com
Mon Nov 14 11:44:13 CST 2016


Isn’t it a bit odd to use ‘.foundation’ as the name of the directory, when Foundation is just one of the libraries involved? On Darwin, the prefs are organized by application, not by framework.

- Tony

> On Nov 14, 2016, at 1:43 AM, Pushkar N Kulkarni via swift-corelibs-dev <swift-corelibs-dev at swift.org> wrote:
> 
> Thanks Will! 
> 
> "NSHomeDirectory() + "/.foundation/Cookies/shared" seems good to me
> 
> Pushkar N Kulkarni,
> IBM Runtimes
> 
> Simplicity is prerequisite for reliability - Edsger W. Dijkstra
> 
> 
> 
> -----Will Stanton <willstanton1 at yahoo.com <mailto:willstanton1 at yahoo.com>> wrote: -----
> To: Pushkar N Kulkarni/India/IBM at IBMIN
> From: Will Stanton <willstanton1 at yahoo.com <mailto:willstanton1 at yahoo.com>>
> Date: 11/08/2016 08:45AM
> Cc: swift-corelibs-dev <swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>>
> Subject: Re: [swift-corelibs-dev] Implementing HTTPCookieStorage
> 
> Was wondering if there could be a common directory for Foundation-related files, such as NSUserDefaults in addition to cookie storage?
> 
> So maybe for cookies:
> NSHomeDirectory() + "/.foundation/Cookies/shared"
> 
> And settings for an app/service:
> NSHomeDirectory() + "/.foundation/Preferences/EXECUTABLE_NAME.plist"
> 
> 
> And I’m not familiar with how Apple Foundation/CFNetwork/nsurlsessiond handles cookies… or caches things, but I think I agree with Kenny that naming symmetry would be nice if there is a per-user cookies file.
> 
> So having a /Library may be nicer, but potentially unnecessary?
> NSHomeDirectory() + "/.foundation/Library/Cookies/Cookies.something"
> 
> Regards,
> Will Stanton
> 
> > On Nov 7, 2016, at 5:45 PM, Tony Parker via swift-corelibs-dev <swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>> wrote:
> > 
> > Hi Pushkar,
> > 
> > Good question. If this were Darwin I guess I would say ~/Library/Application Support — but I don’t know what the best practices are on other platforms. Does anyone out there have some suggestions?
> 
> 
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20161114/2177bb11/attachment.html>


More information about the swift-corelibs-dev mailing list