Lines Matching full:path

28     // UNC path: \\server\share\resource
57 // UNC paths on posix are considered a single path that has backslashes:
58 const fileURL = url.pathToFileURL('\\\\nas\\share\\path.txt').href;
68 { path: 'C:\\foo', expected: 'file:///C:/foo' },
70 { path: 'C:\\FOO', expected: 'file:///C:/FOO' },
72 { path: 'C:\\dir\\foo', expected: 'file:///C:/dir/foo' },
74 { path: 'C:\\dir\\', expected: 'file:///C:/dir/' },
76 { path: 'C:\\foo.mjs', expected: 'file:///C:/foo.mjs' },
78 { path: 'C:\\foo bar', expected: 'file:///C:/foo%20bar' },
80 { path: 'C:\\foo?bar', expected: 'file:///C:/foo%3Fbar' },
82 { path: 'C:\\foo#bar', expected: 'file:///C:/foo%23bar' },
84 { path: 'C:\\foo&bar', expected: 'file:///C:/foo&bar' },
86 { path: 'C:\\foo=bar', expected: 'file:///C:/foo=bar' },
88 { path: 'C:\\foo:bar', expected: 'file:///C:/foo:bar' },
90 { path: 'C:\\foo;bar', expected: 'file:///C:/foo;bar' },
92 { path: 'C:\\foo%bar', expected: 'file:///C:/foo%25bar' },
94 { path: 'C:\\foo\\bar', expected: 'file:///C:/foo/bar' },
96 { path: 'C:\\foo\bbar', expected: 'file:///C:/foo%08bar' },
98 { path: 'C:\\foo\tbar', expected: 'file:///C:/foo%09bar' },
100 { path: 'C:\\foo\nbar', expected: 'file:///C:/foo%0Abar' },
102 { path: 'C:\\foo\rbar', expected: 'file:///C:/foo%0Dbar' },
104 { path: 'C:\\fóóbàr', expected: 'file:///C:/f%C3%B3%C3%B3b%C3%A0r' },
106 { path: 'C:\\€', expected: 'file:///C:/%E2%82%AC' },
108 { path: 'C:\\?', expected: 'file:///C:/%F0%9F%9A%80' },
109 // UNC path (see https://docs.microsoft.com/en-us/archive/blogs/ie/file-uris-in-windows)
110 { path: '\\\\nas\\My Docs\\File.doc', expected: 'file://nas/My%20Docs/File.doc' },
115 { path: '/foo', expected: 'file:///foo' },
117 { path: '/FOO', expected: 'file:///FOO' },
119 { path: '/dir/foo', expected: 'file:///dir/foo' },
121 { path: '/dir/', expected: 'file:///dir/' },
123 { path: '/foo.mjs', expected: 'file:///foo.mjs' },
125 { path: '/foo bar', expected: 'file:///foo%20bar' },
127 { path: '/foo?bar', expected: 'file:///foo%3Fbar' },
129 { path: '/foo#bar', expected: 'file:///foo%23bar' },
131 { path: '/foo&bar', expected: 'file:///foo&bar' },
133 { path: '/foo=bar', expected: 'file:///foo=bar' },
135 { path: '/foo:bar', expected: 'file:///foo:bar' },
137 { path: '/foo;bar', expected: 'file:///foo;bar' },
139 { path: '/foo%bar', expected: 'file:///foo%25bar' },
141 { path: '/foo\\bar', expected: 'file:///foo%5Cbar' },
143 { path: '/foo\bbar', expected: 'file:///foo%08bar' },
145 { path: '/foo\tbar', expected: 'file:///foo%09bar' },
147 { path: '/foo\nbar', expected: 'file:///foo%0Abar' },
149 { path: '/foo\rbar', expected: 'file:///foo%0Dbar' },
151 { path: '/fóóbàr', expected: 'file:///f%C3%B3%C3%B3b%C3%A0r' },
153 { path: '/€', expected: 'file:///%E2%82%AC' },
155 { path: '/?', expected: 'file:///%F0%9F%9A%80' },
159 for (const { path, expected } of testCases) {
160 const actual = url.pathToFileURL(path).href;