Hi,
I am trying to make a directory and copy a file. but it is giving me an error.
java.io.filenotfoundexception:/storage/sdcard0/appfiles/Share.txt: open failed: ENOENT (NO SUCH FILE OR DIRECTORY).
I have added the Share.txt file inside files folder.
below is my sample code.
Any one please help me.
I am trying to make a directory and copy a file. but it is giving me an error.
java.io.filenotfoundexception:/storage/sdcard0/appfiles/Share.txt: open failed: ENOENT (NO SUCH FILE OR DIRECTORY).
I have added the Share.txt file inside files folder.
below is my sample code.
Any one please help me.
'Activity module
Sub Process_Globals
Dim Dir As String : Dir = File.DirRootExternal & "/appfiles"
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime AND File.Exists(Dir, "*.*") = False Then
File.MakeDir(File.DirRootExternal, "appfiles")
If File.Exists(Dir, "Share.txt") = False Then
File.Copy(File.DirAssets, "Share.txt", Dir, "Share.txt")
End If
End If
File.WriteString(File.DirRootExternal, "Share.txt", "Some text")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub