Skip to content

joinFilePath

Node.js 런타임 필요 ('qsu/node')

지정된 매개 변수 값에 따라 각 운영 체제에 대한 경로를 결합합니다.

Dart에서 paths 파라미터는 하나의 인자만 받아들이며, 인자는 List로 구성됩니다.

Parameters

이름타입필수기본값
isWindowsnamedboolean
Whether the target operating system to be checked is Windows
pathsstring[]
A path value consisting of one or more strings. Omit the path separator and put it in the parameter.

named 표시가 있는 파라미터는 Dart에서는 named 파라미터, Python에서는 키워드 인자로 전달됩니다.

Returns

string

Examples

javascript
joinFilePath(true, 'C:\\', 'Windows', 'System32'); // 'C:\Windows\System32'
joinFilePath(false, 'home', '/user', '.bashrc'); // '/home/user/.bashrc'
dart
joinFilePath(['C:\\', 'Windows', 'System32'], isWindows: true); // 'C:\Windows\System32'
joinFilePath(['home', '/user', '.bashrc']); // '/home/user/.bashrc'
python
joinFilePath(True, 'C:\\', 'Windows', 'System32') # 'C:\Windows\System32'
joinFilePath(False, 'home', '/user', '.bashrc') # '/home/user/.bashrc'

Released under the MIT License