equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package sun.nio.fs; |
26 package sun.nio.fs; |
27 |
27 |
28 import java.nio.file.spi.FileSystemProvider; |
28 import java.nio.file.FileSystem; |
29 |
29 |
30 /** |
30 /** |
31 * Creates this platform's default FileSystemProvider. |
31 * Creates this platform's default FileSystemProvider. |
32 */ |
32 */ |
33 |
33 |
34 public class DefaultFileSystemProvider { |
34 public class DefaultFileSystemProvider { |
|
35 private static final AixFileSystemProvider INSTANCE |
|
36 = new AixFileSystemProvider(); |
|
37 |
35 private DefaultFileSystemProvider() { } |
38 private DefaultFileSystemProvider() { } |
36 |
39 |
37 /** |
40 /** |
38 * Returns the default FileSystemProvider. |
41 * Returns the platform's default file system provider. |
39 */ |
42 */ |
40 public static FileSystemProvider create() { |
43 public static AixFileSystemProvider instance() { |
41 return new AixFileSystemProvider(); |
44 return INSTANCE; |
|
45 } |
|
46 |
|
47 /** |
|
48 * Returns the platform's default file system. |
|
49 */ |
|
50 public static FileSystem theFileSystem() { |
|
51 return INSTANCE.theFileSystem(); |
42 } |
52 } |
43 } |
53 } |