# open Source: https://www.nianticspatial.com/docs/api/swift/NSDK.PlaybackDataset.method-open/ open Opens the dataset directory at `datasetPath`, read through native playback. --- ## Declaration static func open(datasetPath: String) -> PlaybackDataset? #### Summary Opens the dataset directory at datasetPath, read through native playback. #### Returns The dataset, or nil if it cannot be opened or parsed ### Parameters | Name | Type | Summary | | --- | --- | --- | | datasetPath | String | - | --- ## Overload 1 static func open(directory: String, bundle: Bundle = .main) -> PlaybackDataset? #### Summary Opens the dataset in directory of bundle, read through native playback. #### Returns The dataset, or nil if the directory is not in the bundle or cannot be opened ### Parameters | Name | Type | Summary | | --- | --- | --- | | directory | String | - | | bundle | Bundle | - | --- ## Overload 2 static func open(scanId: String, onProgress: ((Double) -> Void)? = nil) async throws -> PlaybackDataset #### Summary Opens a scan's recording from the Niantic Spatial portal through the active NSDKSession's playback cache; see NSDKPlaybackCacheSession.open(scanId:onProgress:). Uses the most recently created session; create and authorize it first. Releasing it ends the open with PlaybackOpenError.sessionEnded. #### Throws PlaybackOpenError.noSession if no session is active, and otherwise what NSDKPlaybackCacheSession.open(scanId:onProgress:) throws. ### Parameters | Name | Type | Summary | | --- | --- | --- | | scanId | String | - | | onProgress | ((Double) -> Void)? | - | ---