equal
deleted
inserted
replaced
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package java.io; |
26 package java.io; |
27 |
27 |
28 import java.security.AccessController; |
|
29 import java.util.Locale; |
28 import java.util.Locale; |
|
29 import java.util.Properties; |
30 import sun.security.action.GetPropertyAction; |
30 import sun.security.action.GetPropertyAction; |
31 |
31 |
32 /** |
32 /** |
33 * Unicode-aware FileSystem for Windows NT/2000. |
33 * Unicode-aware FileSystem for Windows NT/2000. |
34 * |
34 * |
40 private final char slash; |
40 private final char slash; |
41 private final char altSlash; |
41 private final char altSlash; |
42 private final char semicolon; |
42 private final char semicolon; |
43 |
43 |
44 public WinNTFileSystem() { |
44 public WinNTFileSystem() { |
45 slash = AccessController.doPrivileged( |
45 Properties props = GetPropertyAction.getProperties(); |
46 new GetPropertyAction("file.separator")).charAt(0); |
46 slash = props.getProperty("file.separator").charAt(0); |
47 semicolon = AccessController.doPrivileged( |
47 semicolon = props.getProperty("path.separator").charAt(0); |
48 new GetPropertyAction("path.separator")).charAt(0); |
|
49 altSlash = (this.slash == '\\') ? '/' : '\\'; |
48 altSlash = (this.slash == '\\') ? '/' : '\\'; |
50 } |
49 } |
51 |
50 |
52 private boolean isSlash(char c) { |
51 private boolean isSlash(char c) { |
53 return (c == '\\') || (c == '/'); |
52 return (c == '\\') || (c == '/'); |