I have a sandboxed app where the user can save listbox contents as a textfile. A method is supposed to check in the documents folder whether a file is already existing and if yes, it adds a counter to the name.
The problem I have is that SpecialFolder.Documents points to a folder inside of the container, but when used with the SaveAsDialog, then it points to the documents folder outside of the container. So my method never can check at the right place.
With AppWrapper I have added the documents folder to “Access Specific Files” under Package->Apple Events & Specific Files. I checked “Relative” and “Write”
I thought like this I would have read/write access to the standard documents folder.
Is there a way how I could check for a file existing in the standard documents folder, from a sandboxed app?
[code] Dim ExportFolder As FolderItem = SpecialFolder.Documents
Dim fName As String = im.GetNewFileName(ExportFolder,myname,".txt")
Dim dlg As New SaveAsDialog
Dim ExportFile As FolderItem
dlg.promptText=imStrings.imListboxSaveEnterFileName // Enter a new filename
ExportFile = dlg.ShowModal[/code]