ファイルをフォルダー内に保存したいのですが、発生する問題は、ファイルがフォルダーの外に保存されていることであり、面倒です。今までやってきたことをシェアします。
-- get raw path to app's Temporary directory
local doc_path = system.pathForFile( "", system.DocumentsDirectory )
-- change current working directory
local success = lfs.chdir( doc_path ) -- returns true on success
local new_folder_path
if success then
lfs.mkdir( "MyNewFolder" )
new_folder_path = lfs.currentdir() .. "/MyNewFolder"
end
local filePath = system.pathForFile( dataFileName , new_folder_path )
r = media.newRecording(filePath)
--print("new recording has been started with a name"..dataFileName)
r:startRecording()
しかし、録音したファイルはこの新しく作成されたフォルダーの外にあります。誰か助けてもらえますか?