<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Here is the branch where I started the work but didn’t get too far.<div class=""><br class=""></div><div class=""><a href="https://github.com/parkera/swift-corelibs-foundation/tree/parkera/xdg_implementation" class="">https://github.com/parkera/swift-corelibs-foundation/tree/parkera/xdg_implementation</a></div><div class=""><br class=""></div><div class="">One tricky part is that we need to figure out a way to test this stuff without exposing public API from file manager…</div><div class=""><br class=""></div><div class="">- Tony</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 23, 2017, at 2:09 AM, Pushkar N Kulkarni <<a href="mailto:pushkar.nk@in.ibm.com" class="">pushkar.nk@in.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class="">Hi Tony, </div><div class=""><br class=""></div><div class="">Thanks! A starting point will really help. </div><div class=""><br class=""></div><div class="">I've filed a feature request on JIRA: <a href="https://bugs.swift.org/browse/SR-3697" target="_blank" class="">https://bugs.swift.org/browse/SR-3697</a></div><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font class=""><font class=""><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div dir="ltr" style="font-style: normal;" class=""><br class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">Pushkar N Kulkarni,</font></div>
<div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">IBM Runtimes</font></div><div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class=""><br class=""></font></div><div dir="ltr" class=""><font face="serif, Times New Roman, Times, serif" class=""><i class="">Simplicity is prerequisite for reliability - Edsger W. Dijkstra</i></font></div>
<div dir="ltr" style="font-style: normal; font-size: 10.5pt; font-family: Arial;" class=""><br class=""></div></div></div></div></font></font></font></div><br class=""><br class=""><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font color="#990099" class=""><a href="mailto:-----anthony.parker@apple.com" target="_blank" class="">-----anthony.parker@apple.com</a> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;" class="">To: Pushkar N Kulkarni <<a href="mailto:pushkar.nk@in.ibm.com" target="_blank" class="">pushkar.nk@in.ibm.com</a>><br class="">From: Tony Parker <anthony.parker@apple.com class=""><br class="">Sent by: <a href="mailto:anthony.parker@apple.com" target="_blank" class="">anthony.parker@apple.com</a><br class="">Date: 01/20/2017 11:28PM<br class="">Cc: Will Stanton <<a href="mailto:willstanton1@yahoo.com" target="_blank" class="">willstanton1@yahoo.com</a>>, swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a>><br class="">Subject: Re: [swift-corelibs-dev] Implementing HTTPCookieStorage<br class=""><br class=""><!--Notes ACF
<meta http-equiv="Content-Type" content="text/html charset=utf8">-->Yup, I think that makes sense.<div class=""><br class=""></div><div class="">I started an implementation a bit ago but didn’t get very far before I got derailed onto some other topics. I’ll see if I can clean it up and put it somewhere as a starting point.</div><div class=""><br class=""></div><div class="">- Tony</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 20, 2017, at 2:31 AM, Pushkar N Kulkarni <<a href="mailto:pushkar.nk@in.ibm.com" class="">pushkar.nk@in.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class="">Hi Tony, Will, others: </div><div class=""><br class=""></div><div class="">Apologies for bringing this up after a long time!</div><div class=""><br class=""></div><div class="">I hope we still agree on the use of the "XDG Base Directory Specification". I did a quick read of the spec document. </div><div class=""><br class=""></div><div class="">I am happy to file a JIRA report for this.</div><div class=""><br class=""></div><div class="">The scope, as I understand it is: CoreFoundation will implement the "XDG Base Directory Specification" and present an API to allow Foundation to retrieve the different absolute paths(related to the different env variables defined), which will be used to persist the different kinds of user data.</div><div class=""><br class=""></div><div class="">Please do let me know if my understanding is correct. Please augment it if necessary. </div><div class=""><br class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font class=""><font class=""><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div dir="ltr" style="font-style: normal;" class="">Thanks!<br class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">Pushkar N Kulkarni,</font></div><div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">IBM Runtimes</font></div><div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class=""><br class=""></font></div><div dir="ltr" class=""><font face="serif, Times New Roman, Times, serif" class=""><i class="">Simplicity is prerequisite for reliability - Edsger W. Dijkstra</i></font></div><div dir="ltr" style="font-style: normal; font-size: 10.5pt; font-family: Arial;" class=""><br class=""></div></div></div></div></font></font></font></div><br class=""><br class=""><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font color="#990099" class=""><a href="mailto:-----swift-corelibs-dev-bounces@swift.org" target="_blank" class="">-----swift-corelibs-dev-bounces@swift.org</a> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;" class="">To: Will Stanton <<a href="mailto:willstanton1@yahoo.com" target="_blank" class="">willstanton1@yahoo.com</a>><br class="">From: Tony Parker via swift-corelibs-dev <swift-corelibs-dev@swift.org class=""><br class="">Sent by: <a href="mailto:swift-corelibs-dev-bounces@swift.org" target="_blank" class="">swift-corelibs-dev-bounces@swift.org</a><br class="">Date: 11/17/2016 03:45AM<br class="">Cc: swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a>><br class="">Subject: Re: [swift-corelibs-dev] Implementing HTTPCookieStorage<br class=""><br class=""><div class=""><font face="Courier New,Courier,monospace" size="3" class="">Hi Will,<br class=""><br class="">> On Nov 14, 2016, at 12:56 PM, Will Stanton <<a href="mailto:willstanton1@yahoo.com" target="_blank" class="">willstanton1@yahoo.com</a>> wrote:<br class="">> <br class="">> Hello Tony,<br class="">> <br class="">> Thanks for the reply. About XDG_DATA_HOME, the variable is undefined on my desktop-less server, and I think many processes still have their own save locations.<br class="">> Still, I can believe its used in a lot of places (<a href="https://github.com/search?q=XDG_DATA_HOME&type=Code&utf8=" target="_blank" class="">https://github.com/search?q=XDG_DATA_HOME&type=Code&utf8=</a>✓) and am not opposed to it!<br class="">> <br class="">> Perhaps SEARCH/$EXECUTABLE_NAME/Preferences.plist would be good place and format for NSUserDefaults with SEARCH = getenv(XDG_DATA_HOME) then ~/.config?<br class="">> <br class="">> <br class="">> What about the path for cookies+caches?<br class=""><br class="">I’m just reading this spec for the first time, but it looks like it accounts for that:<br class=""><br class="">> • There is a single base directory relative to which user-specific non-essential (cached) data should be written. This directory is defined by the environment variable $XDG_CACHE_HOME.<br class=""><br class="">Overall the spec looks reasonable and seems to be close to what we we would need.<br class=""><br class="">A great next step would be to file a JIRA and look for volunteers who want to help implement this in SCL-Foundation.<br class=""><br class="">- Tony<br class=""><br class="">> <br class="">> Regards,<br class="">> Will Stanton<br class="">> <br class="">>> On Nov 14, 2016, at 2:37 PM, Tony Parker via swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a>> wrote:<br class="">>> <br class="">>> Off-list, someone pointed me here:<br class="">>> <br class="">>> <a href="https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html" class="">https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html</a><br class="">>> <br class="">>> and here:<br class="">>> <br class="">>> <a href="http://stackoverflow.com/questions/1024114/location-of-ini-config-files-in-linux-unix" class="">http://stackoverflow.com/questions/1024114/location-of-ini-config-files-in-linux-unix</a><br class="">>> <br class="">>> Noting that there seems to be a growing consensus for $HOME/.config.<br class="">>> <br class="">>> Is this spec beginning to be used in the real world?<br class="">> <br class=""><br class="">_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br class=""></font></div></swift-corelibs-dev@swift.org></div></div></font></font><br class="">
</div></blockquote></div><br class=""></div></anthony.parker@apple.com></div></div></font></font><br class="">
</div></blockquote></div><br class=""></div></body></html>