diff --git a/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets b/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets index d4d5f4373a0ff8f246dc14a7ec1b218e87eaedbf..1c5e9f76656630bf11275ce124887d686b38942e 100644 --- a/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets +++ b/interfaces/kits/js/ani/file_cloud_sync/ets/@ohos.file.cloudSync.ets @@ -561,7 +561,7 @@ export default namespace cloudSync { return promise; } - export function getFileSyncState(uri: Array): Promise> { + export function getFileSyncStateReturnsPromise(uri: Array): Promise> { let promise = new Promise>((resolve, reject) => { let promises = uri.map((v: string): Promise => {return getPromiseFileSyncState(v)}); Promise.all(promises).then((re: Array): void => { @@ -576,7 +576,7 @@ export default namespace cloudSync { return promise; } - export function getFileSyncState(uri: Array, callback: AsyncCallback>): void { + export function getFileSyncStateWithCallback(uri: Array, callback: AsyncCallback>): void { let promises = uri.map((v: string): Promise => {return getPromiseFileSyncState(v)}); Promise.all(promises).then((re: Array): void => { let res: Array = re.map((result: int) => { @@ -591,11 +591,13 @@ export default namespace cloudSync { }); } - export function getFileSyncState(uri: string): FileSyncState { + export function getFileSyncStateWithUri(uri: string): FileSyncState { let res: int = StaticFunction.getFileSyncStateInner(uri); return res as FileSyncState; } + export overload getFileSyncState { getFileSyncStateReturnsPromise, getFileSyncStateWithCallback, getFileSyncStateWithUri } + export function registerChange(uri: string, recursion: boolean, callback: Callback): void { StaticFunction.registerChangeInner(uri, recursion, callback); }