语言

Menu
Sites
Language
tizen download api: overwrite file

everytime I download a file twice, the tizen api adds _2 (_3,...) to the filename. Is there a way to overwrite an existing file (instead of using the file api and delete the file)?

响应

3 回复
Raghavendra Reddy Shiva

The download API doesn't allow to overwrite the file, so only way is to check for the filename which is being downloaded, if the same filename exists delete the file before you start the download.

On side note.. PhoneGap/Cordova is now supported on Tizen and even on PhoneGap's API "FileTransfer" , the FileEntry object provides methods to remove the file, and ofcourse this method should be called explicitly before downloading a file (using FileTransfer object).

Thomas Uher

Thank you for your answer The last time I checked, Phonegap was only supported up to v2.9 - is 3.x now supported?

Raghavendra Reddy Shiva

PhoneGap is now Cordova and the latest available version is 3.1.0, http://cordova.apache.org/#

But Tizen is not integrated on 3.x branch and it will be available soon.

In the mean while, please find the Cordova supporting Tizen 2.2.

https://github.com/apache/cordova-tizen