2 var path = require('path')
4 // get drive on windows
5 function getRootPath (p) {
6 p = path.normalize(path.resolve(p)).split(path.sep)
7 if (p.length > 0) return p[0]
11 // http://stackoverflow.com/a/62888/10333 contains more accurate
12 // TODO: expand to include the rest
13 var INVALID_PATH_CHARS = /[<>:"|?*]/
15 function invalidWin32Path (p) {
16 var rp = getRootPath(p)
18 return INVALID_PATH_CHARS.test(p)
22 getRootPath: getRootPath,
23 invalidWin32Path: invalidWin32Path