public function getFD($num) {
		$folders = [
			'/proc/self/fd',
			'/dev/fd'
		];
		foreach ($folders as $folder) {
			if (file_exists($folder)) {
				return $folder . '/' . $num;
			}
		}
		throw new Exception('Cant find file descriptor path');
	}
public function getFD($num) {
		$folders = [
			'/proc/self/fd',
			'/dev/fd'
		];
		foreach ($folders as $folder) {
			if (file_exists($folder)) {
				return $folder . '/' . $num;
			}
		}
		throw new Exception('Cant find file descriptor path');
	}
public function getFD ( $ num ) { $ folders = [ '/proc/self/fd' , '/dev/fd' ] ; foreach ( $ folders as $ folder ) { if ( file_exists ( $ folder ) ) { return $ folder . '/' . $ num ; } } throw new Exception ( 'Cant find file descriptor path' ) ; }
Get the path to a file descriptor of the current process

@param int $num the file descriptor id
@return string
@throws Exception
Get the path to a file descriptor of the current process