Motivated by edge behaviour reported for biological organisms, we show that random walks with a bias at a boundary lead to a discontinuous probability density across the boundary. We continue by studying more general diffusion processes with such a discontinuity across an interior boundary. We show how hitting probabilities, occupancy times and conditional occupancy times may be solved from problems that are adjoint to the original diffusion problem. We highlight our results with a biologically motivated example, where we analyze the movement behaviour of an individual in a network of habitat patches surrounded by dispersal habitat.