  Let $K$ denote a knot inside the homology sphere $Y$. The zero-framed
longitude of $K$ gives the complement of $K$ in $Y$ the structure of a bordered
three-manifold, which may be denoted by $Y(K)$. We compute the
quasi-isomorphism type of the bordered Floer complex of $Y(K)$ in terms of the
knot Floer complex associated with $K$. As a corollary, we show that if a
homology sphere has the same Heegaard Floer homology as $S^3$ it does not
contain any incompressible tori. Consequently, if $Y$ is an irreducible
homology sphere $L$-space then $Y$ is either $S^3$, or the Poicar\'e sphere
$\Sigma(2,3,5)$, or it is hyperbolic.
