\erdiko\core\datasourceFile

File Class

Summary

Methods
Properties
Constants
__construct()
write()
read()
delete()
move()
rename()
copy()
fileExists()
__destruct()
No public properties found
No constants found
No protected methods found
$_defaultPath
N/A
No private methods found
No private properties found
N/A

Properties

$_defaultPath

$_defaultPath : 

Default Path

Type

Methods

__construct()

__construct(string $defaultPath)

Contructor

Parameters

string $defaultPath

write()

write(string $content, string $filename, string $pathToFile, string $mode) : integer

Write string to file

Parameters

string $content
string $filename
string $pathToFile
string $mode
  • Default mode: w

Returns

integer —
  • bytes written to file

read()

read(string $filename, string $pathToFile) : string

Read string to file

Parameters

string $filename
string $pathToFile

Returns

string

delete()

delete(string $filename, string $pathToFile) : boolean

Delete a file

Parameters

string $filename
string $pathToFile

Returns

boolean

move()

move(string $filename, string $pathTo,  $pathFrom) : boolean

Move a file

Parameters

string $filename
string $pathTo
$pathFrom

Returns

boolean

rename()

rename(string $oldName,  $newName,  $pathToFile) : boolean

Rename a file

Parameters

string $oldName
$newName
$pathToFile

Returns

boolean

copy()

copy(string $filename, string $newFilePath, string $newFileName, string $pathToFile) : boolean

Copy a file

Parameters

string $filename
string $newFilePath
string $newFileName
string $pathToFile

Returns

boolean

fileExists()

fileExists(string $filename, string $pathToFile) : boolean

Check if a file exists

Parameters

string $filename
string $pathToFile

Returns

boolean

__destruct()

__destruct()

Destructor