Function brane_shr::fs::recurse_in_only_child_async

source ·
pub async fn recurse_in_only_child_async(
    dir: impl AsRef<Path>,
) -> Result<PathBuf, Error>
Expand description

Unwraps a folder into its only child folder.

§Arguments

  • dir: The directory to recurse in.

§Returns

The path of the nested directory.

§Errors

This function may error if:

  • The given dir is not a directory;
  • It has another number than 1 entries; or
  • That entry is not a directory.