String resolvePath(String path) { if (path.contains('~')) { path = path.replaceAll('~', userHomePath!); } return path; }