Download flutter/dev/devicelab/lib/framework/host_agent.dart from luom2645/agent-workspace: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/dev/devicelab/lib/framework/host_agent.dart
- Command line
-
hf download hf://luom2645/agent-workspace@7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/dev/devicelab/lib/framework/host_agent.dart
-
curl -L -o host_agent.dart https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/dev/devicelab/lib/framework/host_agent.dart
1.32 kB
| // Copyright 2014 The Flutter Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| import 'package:file/file.dart'; | |
| import 'package:file/local.dart'; | |
| import 'package:meta/meta.dart'; | |
| import 'package:platform/platform.dart'; | |
| /// The current host machine running the tests. | |
| HostAgent get hostAgent => HostAgent(platform: const LocalPlatform(), fileSystem: const LocalFileSystem()); | |
| /// Host machine running the tests. | |
| class HostAgent { | |
| HostAgent({required Platform platform, required FileSystem fileSystem}) | |
| : _platform = platform, | |
| _fileSystem = fileSystem; | |
| final Platform _platform; | |
| final FileSystem _fileSystem; | |
| /// Creates a directory to dump file artifacts. | |
| Directory? get dumpDirectory { | |
| if (_dumpDirectory == null) { | |
| // Set in LUCI recipe. | |
| final String? directoryPath = _platform.environment['FLUTTER_LOGS_DIR']; | |
| if (directoryPath != null) { | |
| _dumpDirectory = _fileSystem.directory(directoryPath)..createSync(recursive: true); | |
| print('Found FLUTTER_LOGS_DIR dump directory ${_dumpDirectory?.path}'); | |
| } | |
| } | |
| return _dumpDirectory; | |
| } | |
| static Directory? _dumpDirectory; | |
| void resetDumpDirectory() { | |
| _dumpDirectory = null; | |
| } | |
| } | |