2021-03-23 08:13:54 +00:00
|
|
|
<?php
|
2021-03-27 09:19:08 +00:00
|
|
|
session_start();
|
2021-03-23 08:13:54 +00:00
|
|
|
/*
|
|
|
|
GPLv2 (C) <2021> <HashCasper>
|
|
|
|
|
2021-03-23 11:55:47 +00:00
|
|
|
This file is part of D2IM.
|
2021-03-23 08:13:54 +00:00
|
|
|
|
2021-03-23 11:55:47 +00:00
|
|
|
D2IM is free software: you can redistribute it and/or modify
|
2021-03-23 08:13:54 +00:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
2021-03-23 11:55:47 +00:00
|
|
|
D2IM is distributed in the hope that it will be useful,
|
2021-03-23 08:13:54 +00:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2021-03-23 11:55:47 +00:00
|
|
|
along with D2IM. If not, see <http://www.gnu.org/licenses/>.
|
2021-03-23 08:13:54 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class D2Files {
|
|
|
|
|
2021-03-27 09:19:08 +00:00
|
|
|
public $files = [];
|
2021-03-23 08:13:54 +00:00
|
|
|
|
|
|
|
public function __construct() {
|
2021-03-27 09:19:08 +00:00
|
|
|
$filesToIgnore = [
|
2021-03-27 09:40:43 +00:00
|
|
|
"AiParms.txt",
|
|
|
|
"CubeMain.txt"
|
2021-03-27 09:19:08 +00:00
|
|
|
];
|
|
|
|
$glob = glob($_SESSION['path'].'*.txt');
|
|
|
|
foreach ($glob as $g){
|
|
|
|
$files[] = basename($g);
|
|
|
|
}
|
|
|
|
$this->files = array_diff($files, $filesToIgnore);
|
2021-03-23 08:13:54 +00:00
|
|
|
return $this->files;
|
|
|
|
}
|
2021-03-26 14:37:56 +00:00
|
|
|
}
|