Skip to content

mahediazad/phpDirectory-Operation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

phpDirectory Operation

This script is to get tree files and folder of a path fo directory

Uses

Get all sub folder form 'test' folder

$generalRoutes = new DirectoryObj(dirname(dirname(FILE)) . DIRECTORY_SEPARATOR.'test'); foreach($generalRoutes->getFiles() as $route) { echo $route['path']; }

Get each files from 'test' folder

$robotRoutes = $robotObj->getFiles($robot['path'].'/test'); foreach($robotRoutes as $robotRoute) { echo $robotRoute['path']; }

Note

  • Each function return a array with include files information such as file/folder name and file/folder actual path
  • Here dirname(dirname(FILE)) can be replace $_SERVER array path of a directory in host

About

File and folder tree directory operation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages