It's possible there's some code somewhere that does that but I'm unaware of 
this. Since this literally replaces the order of the roots it should be OK. 
To be fair this isn't a use case we thought of when we built this behavior 
so I might be missing something.

This is the code that handles this: 
https://github.com/codenameone/CodenameOne/blob/master/Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java#L7594

And also this: 
https://github.com/codenameone/CodenameOne/blob/master/Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java#L7691

On Wednesday, June 9, 2021 at 10:11:41 PM UTC+3 P5music wrote:

> Do you know if 
> ios.newStorageLocation=false
> is overidden in some cases?
> For example for some iOS versions.
> I am testing with iOS 12, along with some other versions, and it seems 
> that for iOS 12 the cn1storage folder is created even with that build hint.
> Does it make sense to you? Is it possible?
>
> Thanks
> Il giorno martedì 8 giugno 2021 alle 08:24:31 UTC P5music ha scritto:
>
>> So, I used the ios.newStorageLocation=false hint
>> and
>> String documentsRoot=FileSystemStorage.getInstance().getRoots()[0];
>> yields a different path of course, I had to change the code for 
>> retrieving the "Application Support" and the "Documents" folders path.
>> It seems to work.
>> Regards
>> Il giorno domenica 6 giugno 2021 alle 03:05:52 UTC+2 Shai Almog ha 
>> scritto:
>>
>>> We place the HTML files from the html directory there, if you pass a 
>>> file to the app it's generally copied into there. We don't write there 
>>> normally though.
>>>
>>> On Saturday, June 5, 2021 at 10:13:28 AM UTC+3 P5music wrote:
>>>
>>>> (5)
>>>> So could the Documents folder passed random content according to what 
>>>> the user does with my app? so the user can see files not moved there 
>>>> explicitly by him/her?
>>>> Is that folder used as the inbox folder for my app and other things as 
>>>> a matter of fact?
>>>> Regards
>>>> Il giorno sabato 5 giugno 2021 alle 06:20:02 UTC Shai Almog ha scritto:
>>>>
>>>>> You might be able to move storage by setting 
>>>>> ios.newStorageLocation=false which will place stoage under the caches 
>>>>> directory. Notice that it might have adverse effects on some things but I 
>>>>> doubt it will impact you much.
>>>>>
>>>>> 1. It might be recreated since things like Preferences use storage and 
>>>>> we use Preferences internally. 
>>>>> 2, 3. Not at this time
>>>>> 4. I think that will work. Didn't test this though
>>>>> 5. Such as? We have the app home directory which we use when you open 
>>>>> a file association etc.
>>>>> On Friday, June 4, 2021 at 9:45:03 AM UTC+3 P5music wrote:
>>>>>
>>>>>> Ok,
>>>>>> I meant for new projects or for developers who are aware of it, 
>>>>>> before publishing the app, like me.
>>>>>>
>>>>>> However, I would like to understand if some other solution is 
>>>>>> available for my project.
>>>>>> My app does not use the Storage at all. It just has two data files in 
>>>>>> the Library/Application Support folder, and uses the Documents folder. 
>>>>>> Both 
>>>>>> are managed with the FileSystem access.
>>>>>>
>>>>>> 1 - Can I delete the cn1storage folder? 
>>>>>> 2 - Can its re-creation be prevented?
>>>>>> 3 - Can I hide the folder? 
>>>>>> 4 - Can it be deleted by mistake but that being harmless, so I do not 
>>>>>> care if the user deletes it, even when it is hidden?
>>>>>> 5 - What about the other CN1 content that can be seen in the 
>>>>>> Documents folder?
>>>>>>
>>>>>> Regards
>>>>>> Il giorno venerdì 4 giugno 2021 alle 03:09:24 UTC Shai Almog ha 
>>>>>> scritto:
>>>>>>
>>>>>>> We can't change something dynamically as it will break 
>>>>>>> compatibility. You can submit an RFE or pull request which provides the 
>>>>>>> different storage location option as an API or configuration.
>>>>>>>
>>>>>>> On Thursday, June 3, 2021 at 4:10:05 PM UTC+3 P5music wrote:
>>>>>>>
>>>>>>>> Can the cn1storage folder be under the Library directory on iOS 
>>>>>>>> instead of Documents for new maven templates or as an option for 
>>>>>>>> existing 
>>>>>>>> projects (at least those unpublished yet like mine)?
>>>>>>>>
>>>>>>>> My app exposes the Documents folder to the user.
>>>>>>>> The user doesn't want to see other content among the "documents". 
>>>>>>>> It also can be accidentally deleted 
>>>>>>>> even if it is made not visible, but it could be an option, I think. 
>>>>>>>> I saw also other files there, as for example a sort of package.
>>>>>>>> There is no technical reason to leave it in the Documents 
>>>>>>>> directory, the Library folder is under control of the app. 
>>>>>>>>
>>>>>>>> My app also created Library/Application Support, that is private to 
>>>>>>>> it.
>>>>>>>> Also other folders can be created under Library, that are different 
>>>>>>>> from the Application Support one (please do not put it there).
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/19e1fa21-4c41-4662-bebb-65e31ffd3e5dn%40googlegroups.com.

Reply via email to