Function cachedir::add_tag

source ·
pub fn add_tag<P: AsRef<Path>>(directory: P) -> Result<()>
Expand description

Adds a tag to the specified directory.

Will return an error if:

  • The directory exists and contains a CACHEDIR.TAG file, regardless of its content.
  • The file can’t be created for any reason (the directory doesn’t exist, permission error, can’t write to the file etc.)