getHomeDirectory static method

String getHomeDirectory(
  1. FileSystem fs
)

Get the home directory. The fs is the file system to use to search for the home directory.

Implementation

static String getHomeDirectory(FileSystem fs) {
  final env = Platform.environment;
  final home = env['HOME'] ?? env['USERPROFILE'];
  return home ?? fs.currentDirectory.path;
}