no warranty for any of the provided information
Script to get content of directory $path.
If $extension is set to some file type, a list of files of this kind is returned.
If $extension = * is set, lists of all subdirectories and all contained files are returned.
<?php /* published under GPL www.gnu.org/licenses/gpl.html */ function readFilenames($path,$extension){ $fileNames=array(); $directories=array(); if (is_dir($path)) { if ($dh = opendir($path)) { if ($extension=="*"){ while (($file = readdir($dh)) !== false) { if (is_dir($path."/".$file)) { if ($file != "." AND $file != ".."){ array_push($directories,$file); } }else{ array_push($fileNames,$file); } } #while closedir($dh); return array($directories,$fileNames); }else{ while (($file = readdir($dh)) !== false) { if (stripos($file,$extension)>0){ array_push($fileNames,$file); } } #while closedir($dh); return $fileNames; } } } } ?>
python
1 | HvcControl.py |
2 | HvcHCSR04ultrasonic.py |
3 | HvcMain.py |
4 | HvcMotorDriver.py |
5 | HvcOneWire.py |
6 | HvcOperationMode.py |
7 | HvcRaw2phys.py |
8 | HvcReadSPI.py |
9 | HvcSendI2C.py |
10 | HvcSetGPIO.py |
11 | HvcTables.py |
12 | HvcWeather.py |
13 | makeDoc.py |
php
Der gesamte Sourcecode darf gemäß GNU General Public License weiterverbreitet werden.