Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
If FirstTime Then
CheckFolders
End If
LoadNotes
End Sub
Sub CheckFolders
If File.Exists(File.DirRootExternal , "/fn/") = False Then
File.MakeDir(File.DirRootExternal , "/fn/")
End If
If File.Exists(File.DirRootExternal , "/fn/notes") = False Then
File.MakeDir(File.DirRootExternal , "/fn/notes")
End If
If File.Exists(File.DirRootExternal , "/fn/edit") = False Then
File.MakeDir(File.DirRootExternal , "/fn/edit")
End If
End Sub
Sub LoadNotes
Dim NoteFiles As List
NoteFiles = File.ListFiles(File.DirRootExternal & "/fn/notes/")
If NoteFiles.Size > 0 Then
NoteFiles.Sort(True)
...
End If
End Sub