isCollectionDirty
isCollectionDirty
Section titled “isCollectionDirty”detect if the collection have changed
const { isDirty, newCtag } = await isCollectionDirty({ collection: calendars[0], headers: { authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj', },});Arguments
Section titled “Arguments”collectionrequired, DAVCollection to detectheadersrequest headersheadersToExcludearray of keys of the headers you want to excludefetchOptionsoptions to pass to underlying fetch function
Return Value
Section titled “Return Value”isDirtya boolean indicate if the collection is dirtynewCtagthe remote ctag, orundefinedwhen the server does not provide one. An unavailable ctag meansisDirty: trueand basic sync fetches a complete snapshot.
Behavior
Section titled “Behavior”use PROPFIND to fetch new ctag of the collection and compare it with current ctag, if the ctag changed, it means collection changed.