Skip to main content

Cwd()

현재 작업 디렉터리(CWD)의 경로를 계산하여 반환하는 함수입니다.

Signature

cwd: (...paths: string[]) => string

Parameters

Parameter

Type

Description

paths

string[]

작업 디렉터리에 추가될 하위 경로들

Returns

string

현재 작업 디렉터리(CWD)의 경로

Example

// 현재 작업 디렉터리의 경로를 계산하는 예시
const filePath = cwd('src', 'components', 'Button');