Search code examples
windowsgitgruntjsfilepathslash

What does slash dot refer to in a file path?


I'm trying to install a grunt template on my computer but I'm having issues. I realized that perhaps something different is happening because of the path given by the Grunt docs, which is

%USERPROFILE%\.grunt-init\

What does that . mean before grunt-init?

I've tried to do the whole import manually but it also isn't working

 git clone https://github.com/gruntjs/grunt-init-gruntfile.git "C:\Users\Imray\AppData\Roaming\npm\gru
nt-init\"

I get a message:

fatal: could not create work tree dir 'C:\Users\Imray\AppData\Roaming\npm\.grunt-init"'.: Invalid argument

Does it have to do with this /.? What does it mean?


Solution

  • The \ (that's a backslash, not a slash) is a directory delimiter. The . is simply part of the directory name.

    .grunt-init and grunt-init are two distinct names, both perfectly valid.

    On Unix-like systems, file and directory names starting with . are hidden by default, which is why you'll often see such names for things like configuration files.