0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

パスを結合する (path.join)

Posted at

ディレクトリ名を表すパスと、ディレクトリ名あるいはファイル名を結合するには、Node.js の標準モジュール path が提供している path.join メソッドを使用します。

例: 実行中のスクリプトのディレクトリ名と hello world.txtというファイル名を結合したパスを取得

node.js
let path = require('path')
let filepath = path.join(__dirname, 'hello world.txt');
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?