public function select($source) {
		$relation = $this->getFileName($source->get_relation());
		// for tree checks relation id and forms absolute path
		if ($relation == '0') {
			$relation = '';
		} else {
			$path = $source->get_source();
		}
		$path = $source->get_source();
		$path = $this->getFileName($path);
		$path = realpath($path);
		if ($path == false) {
			return new FileSystemResult();
		}
		
		if (strpos(realpath($path.'/'.$relation), $path) !== 0) {
			return new FileSystemResult();
		}
		// gets files and directories list
		$res = $this->getFilesList($path, $relation);
		// sorts list
		$res = $res->sort($source->get_sort_by(), $this->config->data);
		return $res;
	}
public function select($source) {
		$relation = $this->getFileName($source->get_relation());
		// for tree checks relation id and forms absolute path
		if ($relation == '0') {
			$relation = '';
		} else {
			$path = $source->get_source();
		}
		$path = $source->get_source();
		$path = $this->getFileName($path);
		$path = realpath($path);
		if ($path == false) {
			return new FileSystemResult();
		}
		
		if (strpos(realpath($path.'/'.$relation), $path) !== 0) {
			return new FileSystemResult();
		}
		// gets files and directories list
		$res = $this->getFilesList($path, $relation);
		// sorts list
		$res = $res->sort($source->get_sort_by(), $this->config->data);
		return $res;
	}
public function select ( $ source ) { $ relation = $ this -> getFileName ( $ source -> get_relation ( ) ) ; // for tree checks relation id and forms absolute path if ( $ relation == '0' ) { $ relation = '' ; } else { $ path = $ source -> get_source ( ) ; } $ path = $ source -> get_source ( ) ; $ path = $ this -> getFileName ( $ path ) ; $ path = realpath ( $ path ) ; if ( $ path == false ) { return new FileSystemResult ( ) ; } if ( strpos ( realpath ( $ path . '/' . $ relation ) , $ path ) !== 0 ) { return new FileSystemResult ( ) ; } // gets files and directories list $ res = $ this -> getFilesList ( $ path , $ relation ) ; // sorts list $ res = $ res -> sort ( $ source -> get_sort_by ( ) , $ this -> config -> data ) ; return $ res ; }
returns list of files and directories
returns list of files and directories