openharmony 鸿蒙 changelogs-filemanagement

2025-06-12 浏览 (1)

File Management Subsystem Changelog

cl.filemanagement.1 chmod, fchmod, chown, fchown, and lchown Function Unavailable

Access Level

Public

Change Impact

This change is a non-compatible change. For security purposes, the APIs for modifying the file permissions and owner are no longer available.

ModuleMethod/Attribute/Enum/ConstantChange Type
@ohos.fileiofunction chmod(path: string, mode: number): PromiseFunction unavailable
@ohos.fileiofunction chmod(path: string, mode: number, callback: AsyncCallback): voidFunction unavailable
@ohos.fileiofunction chmodSync(path: string, mode: number): voidFunction unavailable
@ohos.fileiofunction fchmod(fd: number, mode: number): PromiseFunction unavailable
@ohos.fileiofunction fchmod(fd: number, mode: number, callback: AsyncCallback): voidFunction unavailable
@ohos.fileiofunction fchmodSync(fd: number, mode: number): voidFunction unavailable
@ohos.fileiofunction chown(path: string, uid: number, gid: number): PromiseFunction unavailable
@ohos.fileiofunction chown(path: string, uid: number, gid: number, callback: AsyncCallback): voidFunction unavailable
@ohos.fileiofunction chownSync(path: string, uid: number, gid: number): voidFunction unavailable
@ohos.fileiofunction fchown(fd: number, uid: number, gid: number): PromiseFunction unavailable
@ohos.fileiofunction fchown(fd: number, uid: number, gid: number, callback: AsyncCallback): voidFunction unavailable
@ohos.fileiofunction fchownSync(fd: number, uid: number, gid: number): voidFunction unavailable
@ohos.fileiofunction lchown(path: string, uid: number, gid: number): PromiseFunction unavailable
@ohos.fileiofunction lchown(path: string, uid: number, gid: number, callback: AsyncCallback): voidFunction unavailable
@ohos.fileiofunction lchownSync(path: string, uid: number, gid: number): voidFunction unavailable

Change Since

OpenHarmony SDK 4.1.5.2

Key API/Component Changes

After the change, calling the preceding APIs returns void, without implementing the original functionalities.

Adaptation Guide

For security purposes, the APIs for modifying the file permissions and owner are no longer available. Delete the related APIs in a timely manner.

cl.filemanagement.2 fileio.symlink and fs.symlink Function Unavailable

Access Level

Public

Change Impact

This change is a non-compatible change. For security purposes, the following APIs do not provide original functionalities.

ModuleMethod/Attribute/Enum/ConstantChange Type
@ohos.fileiofunction symlink(target: string, srcPath: string): PromiseFunction unavailable
@ohos.fileiofunction symlink(target: string, srcPath: string, callback: AsyncCallback): voidFunction unavailable
@ohos.fileiofunction symlinkSync(target: string, srcPath: string): voidFunction unavailable
@ohos.file.fsfunction symlink(target: string, srcPath: string): PromiseFunction unavailable
@ohos.file.fsfunction symlink(target: string, srcPath: string, callback: AsyncCallback): voidFunction unavailable
@ohos.file.fsfunction symlinkSync(target: string, srcPath: string): voidFunction unavailable

Change Since

OpenHarmony SDK 4.1.5.2

Key API/Component Changes

After the change, error code 13900012 (Permission denied) will be returned when these APIs are called.

Adaptation Guide

The system does not provide the capability of creating soft links. Delete the related APIs or add exception handling in a timely manner.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Accessibility Framework Subsystem Changelog

harmony 鸿蒙ArkUI Subsystem Changelog

harmony 鸿蒙Theme Framework Subsystem – Screenlock Management Service Changelog

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/DKoBEY