headFile 

Node.js 런타임 필요 ('qsu/node')지정된 텍스트 파일 경로의 첫 줄을 반환합니다. length 인수는 인쇄할 총 줄 수입니다. 기본값은 1입니다.
Parameters
| 이름 | 타입 | 필수 | 기본값 |
|---|---|---|---|
filePath | string | ● | – |
| File or directory path | |||
length![]() named | number | – | 1 |
| Number of lines of text to return | |||

named 표시가 있는 파라미터는 Dart에서는 named 파라미터, Python에서는 키워드 인자로 전달됩니다.
Returns
Promise::string|null
Examples
javascript
await headFile('/home/targets/hello.md', 2); // '# Hello, World!\nSecond line'dart
await headFile('/home/targets/hello.md', length: 2); // '# Hello, World!\nSecond line'python
headFile('/home/targets/hello.md', 2) # '# Hello, World!\nSecond line'