Overview

Namespaces

  • AnalyseModule
    • Models
  • BaseModule
    • Exceptions
    • Models
    • Repository
    • Services
  • DispatchModule
    • Helpers
    • Models
    • Tools
  • PredictModule
  • SearchModule

Classes

  • BaseModel
  • FileModel
  • Overview
  • Namespace
  • Class

Class FileModel

FileModel is used for working with files

BaseModule\Models\BaseModel
Extended by BaseModule\Models\FileModel
Namespace: BaseModule\Models
Located at BaseModule/model/FileModel.php
Methods summary
public
# __construct( string $fileName )

Sets current file

Sets current file

Parameters

$fileName
public
# setFile( string $file )

Sets file name

Sets file name

Parameters

$file
filename
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 )

Append content to the end of file

Append content to the end of file

Parameters

$data
content
public String
# getContent( )

Return a content saved in the file

Return a content saved in the file

Returns

String
The content of the file
public
# deleteFile( )

Removes file

Removes file

public
# removeContent( )

Removes content

Removes content

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

$path
directory path

Returns

boolean
returns FALSE just in case the directory doesn't exist
public static boolean
# deleteDir( string $dir )

Deletes dir completely, including it's content

Deletes dir completely, including it's content

Parameters

$dir
path to directory to delete

Returns

boolean
true on successful deletion
API documentation generated by ApiGen