File API Reference

 Handle files. The path of the file is ALINOUS_HOME based path.

For example, if you want to specify "ALINOUS_HOME/img/top.png", specify "/img/top.png".

appendText($srcAlinousPath, $outText, $encode)

 Append the value of the string dom variable into the file.

copy($srcAlinousPath, $destAlinousPath)

 Copy the file. If you want to copy a directory, use copyDir() instead.

copyDir($srcAlinousPath, $destAlinousPath)

 Copy the directory.

exists($srcAlinousPath)

 Return if the file exists. If exists, returns true, otherwise false.

getDirectory($srcAlinousPath)

 Get the directory name from the string $srcAlinousPath. The returned value is String.

getDirectories($path)

 Return child directories in the directory. The returned variavle's type is Array.

getExtention($srcAlinousPath)

 Get the extention of the file from the string $srcAlinousPath.

getFileName($srcAlinousPath)

 Get the filename from the string $srcAlinousPath.

getFiles($path)

 Return files in the directory. The returned variavle's type is Array.

getSize($alinousPath)

 Get file size.

getTimestamp($srcAlinousPath)

 Return update time of the file or directory.

isDirectory($srcAlinousPath)

 Return if the path is directory. If exists, returns true, otherwise false.

move($srcAlinousPath, $destAlinousPath)

 Move the file or directory.

makeDir($srcAlinousPath)

 Make a new directory.

readAllText($srcAlinousPath, $encode)

 Read all lines of the file and return it as string variable.

remove($alinousPath)

 Remove the file or directory.

putText($srcAlinousPath, $outText, $encode)

 Store the entire of the string dom variable into the file. Always the file is newly overwritten.


Go to Top