public function get_file_attr( $file, $attr, $type = null ) {

		$file_atts = $this->get_file( $file );

		if ( false === $file_atts || false === isset( $file_atts->$attr ) ) {
			return false;
		}

		if ( isset( $type ) && $type !== $file_atts->type ) {
			return false;
		}

		return $file_atts->$attr;
	}
public function get_file_attr( $file, $attr, $type = null ) {

		$file_atts = $this->get_file( $file );

		if ( false === $file_atts || false === isset( $file_atts->$attr ) ) {
			return false;
		}

		if ( isset( $type ) && $type !== $file_atts->type ) {
			return false;
		}

		return $file_atts->$attr;
	}
public function get_file_attr ( $ file , $ attr , $ type = null ) { $ file_atts = $ this -> get_file ( $ file ) ; if ( false === $ file_atts || false === isset ( $ file_atts -> $ attr ) ) { return false ; } if ( isset ( $ type ) && $ type !== $ file_atts -> type ) { return false ; } return $ file_atts -> $ attr ; }
Get a piece of information about a file.

@since 0.1.0

@param string $file The path to the file/directory.
@param string $attr The file attribute to get.
@param string $type The type of file this is expected to be.

@return mixed The value of this attribute, or false on failure.
Get a piece of information about a file .