overwriteFile

Navigation:  Development > Function Reference > Helpers > Utility >

overwriteFile

Previous pageReturn to chapter overviewNext page

Delete previous file and Create a new one.

 

App::Utility()->overwriteFile(Data,Path)

 

Parameter

Description

Data

Data to write in the file

Path

File path

 

 

See bellow example:
 

echo App::Utility()->overwriteFile('Hello World',App::Config()->baseDir("/test.txt"));