Function getRecentSearch

Get the SEARCH body to search for recently modified files

// SEARCH for recent files need a different DAV endpoint
const client = davGetClient(generateRemoteUrl('dav'))
// Timestamp of last week
const lastWeek = Math.round(Date.now() / 1000) - (60 * 60 * 24 * 7)
const contentsResponse = await client.getDirectoryContents(path, {
details: true,
data: davGetRecentSearch(lastWeek),
headers: {
method: 'SEARCH',
'Content-Type': 'application/xml; charset=utf-8',
},
deep: true,
}) as ResponseDataDetailed<FileStat[]>
  • Parameters

    • lastModified: number

      Oldest timestamp to include (Unix timestamp)

    Returns string