Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
saravanaboopati
Posts: 147
Registered: ‎09-10-2008
My Device: Not Specified
Accepted Solution

How to Clear the Content in the Plain Text File?

Can any one tell me how to delete all the contents in the plain Text file !

 

send samples if u have for the reference 

Please use plain text.
Administrator
MSohm
Posts: 14,362
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: How to Clear the Content in the Plain Text File?

If you are using a FileConnection, the easiest way would be to delete the file and then create a new empty file with the same name.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
saravanaboopati
Posts: 147
Registered: ‎09-10-2008
My Device: Not Specified

Re: How to Clear the Content in the Plain Text File?

How to delete the file and create new file with same name?
Please use plain text.
Administrator
MSohm
Posts: 14,362
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: How to Clear the Content in the Plain Text File?

Use the FileConnection.delete method and then the FileConnection.create method to delete and create a file.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.