SystemUtils.ets
603 Bytes
import deviceInfo from '@ohos.deviceInfo';
/**
* 与鸿蒙系统(软件)设备相关(可改变或可升级)属性或操作
*/
export class SystemUtils {
/**
* 返回AGC格式的系统名称
* OpenHarmony 3.2.6.5(Beta2)
*/
static getOsFullName(): string {
// OpenHarmony-3.2.6.5(Beta2)
let fullName = deviceInfo.osFullName.split('-');
if (fullName && fullName.length >= 1) {
return fullName[0] + ' ' + fullName[1];
}
return '';
}
/**
* 返回系统空闲存储空间,TODO:
* @returns number
*/
static getFreeBytes(): number {
return 0;
}
}