getPubDirectories function

Stream<Directory> getPubDirectories()

Implementation

Stream<Directory> getPubDirectories() async* {
  yield await _getInstallationPath();
  if (Platform.isWindows) {
    yield* _lookup<Directory>('C:/Users/${Platform.environment['username']}/AppData/Local/Pub/Cache');
  } else if (Platform.isLinux || Platform.isMacOS) {
    yield* _lookup<Directory>('/home/*/.pub-cache');
  }
  yield* _lookup<Directory>('/root/.pub-cache');
}