DroidScript wiki

(was AndroidScript) unofficial documentation by the community

User Tools

Site Tools


built_in:rename_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

built_in:rename_file [2015/03/04 18:22] (current)
octazid created
Line 1: Line 1:
 +=====RenameFile=====
  
 +//​(Information and examples taken from the DroidScript documentation)//​
 +
 +====Description====
 +
 +The **RenameFile** method renames a file in internal or exernal file storage.
 +
 +<​code>​ app.RenameFile( fileName, newFileName );</​code>​
 +
 +----
 +
 +====Example====
 +
 +<code javascript>​
 +
 +function OnStart()
 +{
 +  var file = "/​sdcard/​wftest.txt";​
 +  app.WriteFile( file, "​Hello"​ );
 +  app.RenameFile( file, "/​sdcard/​wftest2.txt"​ );
 +
 +
 +</​code>​
built_in/rename_file.txt ยท Last modified: 2015/03/04 18:22 by octazid