# saveBuffer Source: https://www.nianticspatial.com/docs/api/swift/NSDK.NSDKDashcamSession.method-saveBuffer/ saveBuffer Saves the current buffer contents and waits for completion. --- ## Declaration func saveBuffer(timeout: Double = 30.0, pollingInterval: TimeInterval = 0.5) async throws -> SaveResult #### Summary Saves the current buffer contents and waits for completion. #### Returns The SaveResult containing the save path on success. #### Throws - NSDKError.invalidOperation if the buffer is empty. - TimeoutError if the save does not complete within the timeout. - CancellationError if the running Task is cancelled. - SaveError.saveFailed if the native save operation failed. ### Parameters | Name | Type | Summary | | --- | --- | --- | | timeout | Double | Maximum duration in seconds to wait (default 30 seconds). | | pollingInterval | TimeInterval | Interval in seconds between progress checks (default 0.5 seconds). | ---