diff --git a/interfaces/ets/ani/ets/@ohos.configPolicy.ets b/interfaces/ets/ani/ets/@ohos.configPolicy.ets index 16929ba6a38522654773b948190ccef94d16b734..31174a34c3576bdbb1d3183e321525971e1c72f1 100644 --- a/interfaces/ets/ani/ets/@ohos.configPolicy.ets +++ b/interfaces/ets/ani/ets/@ohos.configPolicy.ets @@ -33,7 +33,7 @@ namespace configPolicy { native function getCfgDirListSync(): Array; - function getOneCfgFile(relPath: string, callback: AsyncCallback) : void { + function getOneCfgFile_chinast_1(relPath: string, callback: AsyncCallback) : void { taskpool.execute((): string => { return getOneCfgFileSync(relPath); }).then((content: NullishType) => { @@ -43,7 +43,7 @@ namespace configPolicy { }); } - function getOneCfgFile(relPath: string, followMode: FollowXMode, callback: AsyncCallback) : void { + function getOneCfgFile_chinast_2(relPath: string, followMode: FollowXMode, callback: AsyncCallback) : void { taskpool.execute((): string => { return getOneCfgFileSync(relPath, followMode); }).then((content: NullishType) => { @@ -53,7 +53,7 @@ namespace configPolicy { }); } - function getOneCfgFile( + function getOneCfgFile_chinast_3( relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback) : void { taskpool.execute((): string => { return getOneCfgFileSync(relPath, followMode, extra); @@ -64,7 +64,7 @@ namespace configPolicy { }); } - function getOneCfgFile(relPath: string): Promise { + function getOneCfgFile_chinast_4(relPath: string): Promise { return new Promise((resolve, reject) => { taskpool.execute((): string => { return getOneCfgFileSync(relPath); @@ -76,7 +76,7 @@ namespace configPolicy { }); } - function getOneCfgFile(relPath: string, followMode: FollowXMode, extra?: string): Promise { + function getOneCfgFile_chinast_5(relPath: string, followMode: FollowXMode, extra?: string): Promise { return new Promise((resolve, reject) => { taskpool.execute((): string => { return getOneCfgFileSync(relPath, followMode, extra); @@ -88,7 +88,9 @@ namespace configPolicy { }); } - function getCfgFiles(relPath: string, callback: AsyncCallback>) : void { + overload getOneCfgFile { getOneCfgFile_chinast_1, getOneCfgFile_chinast_2,getOneCfgFile_chinast_3,getOneCfgFile_chinast_4,getOneCfgFile_chinast_5 } + + function getCfgFiles_chinast_1(relPath: string, callback: AsyncCallback>) : void { taskpool.execute((): Array => { return getCfgFilesSync(relPath); }).then((content: NullishType) => { @@ -98,7 +100,7 @@ namespace configPolicy { }); } - function getCfgFiles(relPath: string, followMode: FollowXMode, callback: AsyncCallback>) : void { + function getCfgFiles_chinast_2(relPath: string, followMode: FollowXMode, callback: AsyncCallback>) : void { taskpool.execute((): Array => { return getCfgFilesSync(relPath, followMode); }).then((content: NullishType) => { @@ -108,7 +110,7 @@ namespace configPolicy { }); } - function getCfgFiles( + function getCfgFiles_chinast_3( relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback>) : void { taskpool.execute((): Array => { return getCfgFilesSync(relPath, followMode, extra); @@ -119,7 +121,7 @@ namespace configPolicy { }); } - function getCfgFiles(relPath: string): Promise> { + function getCfgFiles_chinast_4(relPath: string): Promise> { return new Promise>((resolve, reject) => { taskpool.execute((): Array => { return getCfgFilesSync(relPath); @@ -131,7 +133,7 @@ namespace configPolicy { }); } - function getCfgFiles(relPath: string, followMode: FollowXMode, extra?: string): Promise> { + function getCfgFiles_chinast_5(relPath: string, followMode: FollowXMode, extra?: string): Promise> { return new Promise>((resolve, reject) => { taskpool.execute((): Array => { return getCfgFilesSync(relPath, followMode, extra); @@ -143,7 +145,9 @@ namespace configPolicy { }); } - function getCfgDirList(callback: AsyncCallback>) : void { + overload getCfgFiles { getCfgFiles_chinast_1, getCfgFiles_chinast_2,getCfgFiles_chinast_3,getCfgFiles_chinast_4,getCfgFiles_chinast_5 } + + function getCfgDirList_chinast_1(callback: AsyncCallback>) : void { taskpool.execute((): Array => { return getCfgDirListSync(); }).then((content: NullishType) => { @@ -153,7 +157,7 @@ namespace configPolicy { }); } - function getCfgDirList(): Promise> { + function getCfgDirList_chinast_2(): Promise> { return new Promise>((resolve, reject) => { taskpool.execute((): Array => { return getCfgDirListSync(); @@ -164,6 +168,9 @@ namespace configPolicy { }); }); } + + overload getCfgDirList { getCfgDirList_chinast_1, getCfgDirList_chinast_2 } + } export default configPolicy;