Master File List Full server paths

BigGuns99 edited this page Jun 8, 2013 · 3 revisions

masterFileListRaw($domain)

This method will return an array with full server paths to files.

    public function masterFileListRaw($domain) {

        // Get root files
        $rootFiles = $this->getFileList($domain);
        if (!empty($rootFiles)) {
            $rootFiles = $this->verifyFiles($rootFiles);
        }
        if (!empty($rootFiles)) {
            foreach ($rootFiles as $file) {
                $finalResults[] = $_SERVER['DOCUMENT_ROOT'] . '/' . $file;
            }
        }
        // Get Subdirectory files
        $results = $this->cycle($domain);

        foreach ($results as $result) {
            $path = $domain . '/' . $result;
            $list = $this->getFileList($path);
            if (!empty($list)) {
                foreach ($list as $file) {
                    $outCome = $this->verifySingleFile($file);
                    if (!$outCome === FALSE) {
                            $finalResults[] = $_SERVER['DOCUMENT_ROOT'] . '/' . $result . '/' . $file;
                    }
                }
            }
        }

        return $finalResults;
    }

}

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.