protected function get_file( $file ) {

		$path_parts = $this->parse_path( $file );

		if ( '' === $path_parts[0] ) {
			$file = $this->root;
			unset( $path_parts[0] );
		} else {
			$file = $this->cwd;
		}

		foreach ( $path_parts as $part ) {

			if ( '' === $part ) {
				continue;
			}

			if ( 'dir' !== $file->type || false === isset( $file->contents->$part ) ) {
				return false;
			}

			$file = $file->contents->$part;
		}

		return $file;
	}
protected function get_file( $file ) {

		$path_parts = $this->parse_path( $file );

		if ( '' === $path_parts[0] ) {
			$file = $this->root;
			unset( $path_parts[0] );
		} else {
			$file = $this->cwd;
		}

		foreach ( $path_parts as $part ) {

			if ( '' === $part ) {
				continue;
			}

			if ( 'dir' !== $file->type || false === isset( $file->contents->$part ) ) {
				return false;
			}

			$file = $file->contents->$part;
		}

		return $file;
	}
protected function get_file ( $ file ) { $ path_parts = $ this -> parse_path ( $ file ) ; if ( '' === $ path_parts [ 0 ] ) { $ file = $ this -> root ; unset ( $ path_parts [ 0 ] ) ; } else { $ file = $ this -> cwd ; } foreach ( $ path_parts as $ part ) { if ( '' === $ part ) { continue ; } if ( 'dir' !== $ file -> type || false === isset ( $ file -> contents -> $ part ) ) { return false ; } $ file = $ file -> contents -> $ part ; } return $ file ; }
Get the data for a file.

@since 0.1.0

@param string $file The file to retrieve.

@return object|false The file data, or false if it does't exist.
Get the data for a file .