src/Net/FTP/Reader.php
protected function parseListEntry( $entry )
	{
		$data	= array();
		$parts	= preg_split("/[\s]+/", $entry, 9 );
		if( $parts[0] == "total" )
			return array();
		$data['isdir']			= $parts[0]{0} === "d";
		$data['islink']			= $parts[0]{0} === "l";
		$data['isfile']			= $parts[0]{0} === "-";
		$data['permissions']	= $parts[0];
		$data['number']			= $parts[1];
		$data['owner']			= $parts[2];
		$data['group']			= $parts[3];
		$data['size']			= $parts[4];
		$data['month']			= $parts[5];
		$data['day']			= $parts[6];
		$data['time']			= $parts[7];
		$data['name']			= $parts[8];
		if( preg_match( "/:/", $data['time'] ) )
			$data['year']		= date( "Y" );
		else
		{
			$data['year']		= $data['time'];
			$data['time']		= "00:00";
		}
		$data['timestamp']		= strtotime( $data['day']." ".$data['month']." ".$data['year']." ".$data['time'] );
		$data['datetime']		= date( "c", $data['timestamp'] );
		$data['type']			= $this->fileTypes[$parts[0]{0}];
		$data['type_short']		= $data['type']{0};
		$data['octal']			= $this->getPermissionsAsOctal( $parts[0] );
		$data['raw']			= $entry;
		return $data;
	}
protected function parseListEntry( $entry )
	{
		$data	= array();
		$parts	= preg_split("/[\s]+/", $entry, 9 );
		if( $parts[0] == "total" )
			return array();
		$data['isdir']			= $parts[0]{0} === "d";
		$data['islink']			= $parts[0]{0} === "l";
		$data['isfile']			= $parts[0]{0} === "-";
		$data['permissions']	= $parts[0];
		$data['number']			= $parts[1];
		$data['owner']			= $parts[2];
		$data['group']			= $parts[3];
		$data['size']			= $parts[4];
		$data['month']			= $parts[5];
		$data['day']			= $parts[6];
		$data['time']			= $parts[7];
		$data['name']			= $parts[8];
		if( preg_match( "/:/", $data['time'] ) )
			$data['year']		= date( "Y" );
		else
		{
			$data['year']		= $data['time'];
			$data['time']		= "00:00";
		}
		$data['timestamp']		= strtotime( $data['day']." ".$data['month']." ".$data['year']." ".$data['time'] );
		$data['datetime']		= date( "c", $data['timestamp'] );
		$data['type']			= $this->fileTypes[$parts[0]{0}];
		$data['type_short']		= $data['type']{0};
		$data['octal']			= $this->getPermissionsAsOctal( $parts[0] );
		$data['raw']			= $entry;
		return $data;
	}
protected function parseListEntry ( $ entry ) { $ data = array ( ) ; $ parts = preg_split ( "/[\s]+/" , $ entry , 9 ) ; if ( $ parts [ 0 ] == "total" ) return array ( ) ; $ data [ 'isdir' ] = $ parts [ 0 ] { 0 } === "d" ; $ data [ 'islink' ] = $ parts [ 0 ] { 0 } === "l" ; $ data [ 'isfile' ] = $ parts [ 0 ] { 0 } === "-" ; $ data [ 'permissions' ] = $ parts [ 0 ] ; $ data [ 'number' ] = $ parts [ 1 ] ; $ data [ 'owner' ] = $ parts [ 2 ] ; $ data [ 'group' ] = $ parts [ 3 ] ; $ data [ 'size' ] = $ parts [ 4 ] ; $ data [ 'month' ] = $ parts [ 5 ] ; $ data [ 'day' ] = $ parts [ 6 ] ; $ data [ 'time' ] = $ parts [ 7 ] ; $ data [ 'name' ] = $ parts [ 8 ] ; if ( preg_match ( "/:/" , $ data [ 'time' ] ) ) $ data [ 'year' ] = date ( "Y" ) ; else { $ data [ 'year' ] = $ data [ 'time' ] ; $ data [ 'time' ] = "00:00" ; } $ data [ 'timestamp' ] = strtotime ( $ data [ 'day' ] . " " . $ data [ 'month' ] . " " . $ data [ 'year' ] . " " . $ data [ 'time' ] ) ; $ data [ 'datetime' ] = date ( "c" , $ data [ 'timestamp' ] ) ; $ data [ 'type' ] = $ this -> fileTypes [ $ parts [ 0 ] { 0 } ] ; $ data [ 'type_short' ] = $ data [ 'type' ] { 0 } ; $ data [ 'octal' ] = $ this -> getPermissionsAsOctal ( $ parts [ 0 ] ) ; $ data [ 'raw' ] = $ entry ; return $ data ; }
Parsed List Entry.
@access		protected
@param		string		$entry		Entry of List
@return		array
Parsed List Entry .