• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Storage Switching
2
3
4  | API in the FA Model| Corresponding d.ts File in the Stage Model| Corresponding API in the Stage Model|
5| -------- | -------- | -------- |
6| GetStorageOptions | There is no corresponding API in the stage model.| The stage model uses **Prefereces** to replace **Storage** and has redesigned the input parameters.|
7| SetStorageOptions | There is no corresponding API in the stage model.| The stage model uses **Prefereces** to replace **Storage** and has redesigned the input parameters.|
8| ClearStorageOptions | There is no corresponding API in the stage model.| The stage model uses **Prefereces** to replace **Storage** and has redesigned the input parameters.|
9| DeleteStorageOptions | There is no corresponding API in the stage model.| The stage model uses **Prefereces** to replace **Storage** and has redesigned the input parameters.|
10| [static get(options: GetStorageOptions): void;](../reference/apis/js-apis-system-storage.md#storageget) | \@ohos.data.preferences.d.ts | [get(key: string, defValue: ValueType, callback: AsyncCallback&lt;ValueType&gt;): void;](../reference/apis/js-apis-data-preferences.md#get)<br>[get(key: string, defValue: ValueType): Promise&lt;ValueType&gt;;](../reference/apis/js-apis-data-preferences.md#get-1) |
11| [static set(options: SetStorageOptions): void;](../reference/apis/js-apis-system-storage.md#storageset) | \@ohos.data.preferences.d.ts | [put(key: string, value: ValueType, callback: AsyncCallback&lt;void&gt;): void;](../reference/apis/js-apis-data-preferences.md#put)<br>[put(key: string, value: ValueType): Promise&lt;void&gt;;](../reference/apis/js-apis-data-preferences.md#put-1) |
12| [static clear(options?: ClearStorageOptions): void;](../reference/apis/js-apis-system-storage.md#storageclear) | \@ohos.data.preferences.d.ts | [clear(callback: AsyncCallback&lt;void&gt;): void;](../reference/apis/js-apis-data-preferences.md#clear)<br>[clear(): Promise&lt;void&gt;;](../reference/apis/js-apis-data-preferences.md#clear-1) |
13| [static delete(options: DeleteStorageOptions): void;](../reference/apis/js-apis-system-storage.md#storagedelete) | \@ohos.data.preferences.d.ts | [delete(key: string, callback: AsyncCallback&lt;void&gt;): void;](../reference/apis/js-apis-data-preferences.md#delete)<br>[delete(key: string): Promise&lt;void&gt;;](../reference/apis/js-apis-data-preferences.md#delete-1) |
14