Class FileModel
FileModel is used for working with files
-
DispatchModule\Models\BaseModel
-
DispatchModule\Models\FileModel
Methods summary
public
|
#
__construct( string $fileName )
Sets current file
Parameters
|
public
|
#
setFile( string $file )
Sets file name
Parameters
|
public
string
|
#
getFile( )
Get file name (including rel. path)
Get file name (including rel. path)
Returns
string
|
public
|
#
createFile( )
Creates (and deletes content if the file exists) the file
Creates (and deletes content if the file exists) the file
|
public
|
#
appendContent( String $data )
Content that will be added to the end of file
Content that will be added to the end of file
Parameters
|
public
String
|
#
getContent( )
Return the file saved in the file
Return the file saved in the file
Returns
String The content of the file
|
public
|
|
public
|
|
public static
boolean
|
#
deleteOldFiles( string $path )
Deletes all old files (older than a week) from the directory
Deletes all old files (older than a week) from the directory
Parameters
Returns
boolean returns FALSE just in case the directory doesn't exist
|