src/woof/woof.cc
// A method to reset the file map.
A method to reset the file map.
A method to reset the file map .
void woof::reset_file_map()
    {
        file_map.clear();
        if (std::filesystem::is_regular_file(path))
        {
            file_map[path] = std::filesystem::last_write_time(path).time_since_epoch().count();
        }
        else
        {
            for (auto &path_entry : std::filesystem::recursive_directory_iterator(path))
            {
                if (path_entry.is_regular_file())
                {
                    file_map[path_entry.path().string()] = path_entry.last_write_time().time_since_epoch().count();
                }
            }
        }
    }
void woof :: reset_file_map ( ) { file_map . clear ( ) ; if ( std :: filesystem :: is_regular_file ( path ) ) { file_map [ path ] = std :: filesystem :: last_write_time ( path ) . time_since_epoch ( ) . count ( ) ; } else { for ( auto & path_entry : std :: filesystem :: recursive_directory_iterator ( path ) ) { if ( path_entry . is_regular_file ( ) ) { file_map [ path_entry . path ( ) . string ( ) ] = path_entry . last_write_time ( ) . time_since_epoch ( ) . count ( ) ; } } } }
A method to reset the file map.
A method to reset the file map .