General

Reply

Member

Member
bichenglin
Posts: 2
Registered: ‎15-05-2012
Message 1 of 7 (504 Views)
Accepted Solution

How the pss read file

     I want to write a program to read note on the psv, so if I use cma to copy the txt file into psv, how to use program to read the file ? I can't find any api in the document and I also try the system.IO.filestream, it even can not create any file by program.

Please use plain text.

Re: How the pss read file

With System.IO.filestream you have read/write access only to the following folders:

/Documents/

/Temp/

 

If you want to have your data persist after having closed your app, use the Documents folder.

Temp folder will be cleaned after closing the session.

 

Please also note that is not allowed to write in subfolders at this moment.

Please use plain text.

Member

Member
bichenglin
Posts: 2
Registered: ‎15-05-2012
Message 3 of 7 (467 Views)

Re: How the pss read file

But if only /Documents/ can use , how to use cma to copy txt file to psv, now I can use simulator read the txt file, but the cma do not allow me to copy file into documents
Please use plain text.

Re: How the pss read file

At this moment it is not possible to place content in that folder using the Content Manager Assistent (CMA).

In general, your app lives in a (very restricted) sandbox where other apps do not have write access to.

 

So, you will have to find (implement) another way to import data into that folder ... using your app.

For example, via a web request, socket connection, ...

 

Please use plain text.

Re: How the pss read file

> "Please also note that is not allowed to write in subfolders at this moment."C

Currently you can only write 5 layers below the main directory. 

 

Example:

"/Application/1/2/3/4/5.dat" -> OK (Same as Documents/, Temp/ directories)

"/Application/1/2/3/4/5/6.dat" -> Not Good (Same as Documents/, Temp/ directories)


PlayStation®Mobile Dev Team
Please use plain text.

Re: How the pss read file

Thanks James,

 

I had used only FileStream which does not automatically create a subdirectory when it doesn't yet exist. Forgot to use Directory.CreateDirectory(path) to do that.

So you are completely right that it is possible to create subdirectories.

 

One question about the Application folder:

Although it currently is possible to write in that folder, will that be allowed in future releases as well?

[In File Path Changed in Open Beta you say

"... that you currently have write access too and we are working to correct this at the moment (for the next SDK release). "

 

Please use plain text.

Re: How the pss read file

@Potato4H3ad, No, you should treat /Application/ as read only.
/Documents/ -> Used for save data
/Temp/ -> Used for storage during the game, but wiped at the end of execution.
PlayStation®Mobile Dev Team
Please use plain text.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。