A
A
AlexStolman2015-04-08 21:54:20
PHP
AlexStolman, 2015-04-08 21:54:20

Convenient php library/class for working with files?

Prompt a simple lightweight library for working with files for PHP.
It needs to execute the following functions:
getAllFiles('path/folder/');
readFile('path/folder/file.txt');
updateFile('path/folder/file.txt');
writeFile('path/folder/file.txt');
deleteFile('path/folder/file.txt');
Goal: Reduce the amount of redundant code and improve its readability.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2015-04-08
@AlexStolman

Library?) all these actions except the first one are done by one function in php. Now, if you needed something like removeDir, cleanDir, then it would make sense, but why?))

F
FanatPHP, 2015-04-08
@FanatPHP

  • getAllFiles() - glob()
    If you want, you can bring them to the library

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question