On Apr 22, 2007, at 15:58 UTC, RBNUBE wrote:

> When saving a path as a string, I was told to use GetSaveInfo in
> conjunction with Base64.
> 
> I honestly don't understand exactly what is going on here.

Well, it's not too complicated -- GetSaveInfo returns binary data,
which could happen to include whatever delimiter your text file uses
(including line feeds, Chr(0)'s, spaces, tabs, or anything else).  In
addition, it almost certainly will not be any sort of valid UTF-8 data,
so if you were to treat it as a string of text, it would cause any text
processing to abort.  So, you pass it through EncodeBase64, and now you
have nice well-behaved ASCII text that can be treated as such.

> I suspect that when you decode the string, the path is not returned, 
> but rather some other sort of pointer:

Right, GetSaveInfo isn't a path (in general), but binary data that
probably includes an alias record on MacOS.  Which is neat, because it
may continue to resolve even if the user has moved or renamed the
original file.  And of course it won't be fooled by having two volumes
mounted with the same name, unlike a path.

Cheers,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to