Context. Recent studies suggest that filamentary structures are representative of the initial conditions of star formation in molecular clouds and support a filament paradigm for star formation, potentially accounting for the origin of the stellar initial mass function (IMF). The detailed, local physical properties of molecular filaments remain poorly characterized, however. Aims. Using Herschel imaging observations of the California giant molecular cloud, we aim to further investigate the filament paradigm for low- to intermediate-mass star formation and to better understand the exact role of filaments in the origin of stellar masses. Methods. Using the multiscale, multiwavelength extraction method getsf, we identify starless cores, protostars, and filaments in the Herschel data set and separate these components from the background cloud contribution to determine accurate core and filament properties. Results. We find that filamentary structures contribute approximately 20% of the overall mass of the California cloud, while compact sources such as dense cores contribute a mere 2% of the total mass. Considering only dense gas (defined as gas with AV,bg > 4.5–7), filaments and cores contribute ~66–73% and 10–14% of the dense gas mass, respectively. The transverse half-power diameter measured for California molecular filaments has a median undeconvolved value of 0.18 pc, consistent within a factor of 2 with the typical ~0.1 pc width of nearby filaments from the Herschel Gould Belt survey. A vast majority of identified prestellar cores (~82–90%) are located within ~0.1 pc of the spines of supercritical filamentary structures. Both the prestellar core mass function (CMF) and the distribution of filament masses per unit length or filament line mass function (FLMF) are consistent with power-law distributions at the high-mass end, ΔN/ΔlogM ∝ M−1.4±0.2 at M > 1 M⊙ for the CMF and ΔN/Δlog Mline ∝ Mline−1.5±0.2 for the FLMF at Mline > 10 M⊙ pc−1, which are both consistent with the Salpeter power-law IMF. Based on these results, we propose a revised model for the origin of the CMF in filaments, whereby the global prestellar CMF in a molecular cloud arises from the integration of the CMFs generated by individual thermally supercritical filaments within the cloud. Conclusions. Our findings support the existence a tight connection between the FLMF and the CMF/IMF and suggests that filamentary structures represent a critical evolutionary step in establishing a Salpeter-like mass function.