path Flashcards

1
Q

como se llama el paquete que te ayuda con los paths? is a core module? or a third-part module?

A

const path = require(‘path’); es un core module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

most common api to concat a path

A

path.join();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

global resource para el directorio donde esta el file que contiene la llamada?

A

__dirname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

como se hace para decirle a path.join que quiere un folder mas arriba en la hierarchy?

A

’../’

por ejemplo: path.join(__dirname, ‘../’, ‘views’, ‘add-product.html’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

method that gives the directory name of a path

A

path.dirname( p);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly