blob: 9ccd8dc6e5bdcc92e4f6ff8650ba31e71424e354 [file] [log] [blame]
Alan Viverette3da604b2020-06-10 18:34:39 +00001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
15 */
16
17package mypackage;
18
19import java.io.IOException;
20import java.net.URI;
21import java.nio.channels.SeekableByteChannel;
22import java.nio.file.AccessMode;
23import java.nio.file.CopyOption;
24import java.nio.file.DirectoryStream;
25import java.nio.file.FileStore;
26import java.nio.file.FileSystem;
27import java.nio.file.LinkOption;
28import java.nio.file.OpenOption;
29import java.nio.file.Path;
30import java.nio.file.attribute.BasicFileAttributes;
31import java.nio.file.attribute.FileAttribute;
32import java.nio.file.attribute.FileAttributeView;
33import java.nio.file.spi.FileSystemProvider;
34import java.util.Map;
35import java.util.Set;
36
37public class MockFileSystemProvider extends FileSystemProvider {
38
39 @Override
40 public String getScheme() {
41 return "stubScheme";
42 }
43
44 @Override
45 public FileSystem newFileSystem(URI uri, Map<String, ?> env) throws IOException {
46 return new MockFileSystem(uri, env);
47 }
48
49 @Override
50 public FileSystem newFileSystem(Path path, Map<String, ?> env) throws IOException {
51 return new MockFileSystem(path, env);
52 }
53
54 @Override
55 public FileSystem getFileSystem(URI uri) {
56 return null;
57 }
58
59 @Override
60 public Path getPath(URI uri) {
61 return null;
62 }
63
64 @Override
65 public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options,
66 FileAttribute<?>[] attrs) throws IOException {
67 return null;
68 }
69
70 @Override
71 public DirectoryStream<Path> newDirectoryStream(Path dir,
72 DirectoryStream.Filter<? super Path> filter) throws IOException {
73 return null;
74 }
75
76 @Override
77 public void createDirectory(Path dir, FileAttribute<?>[] attrs) throws IOException {
78
79 }
80
81 @Override
82 public void delete(Path path) throws IOException {
83
84 }
85
86 @Override
87 public void copy(Path source, Path target, CopyOption... options) throws IOException {
88
89 }
90
91 @Override
92 public void move(Path source, Path target, CopyOption... options) throws IOException {
93
94 }
95
96 @Override
97 public boolean isSameFile(Path path, Path path2) throws IOException {
98 return false;
99 }
100
101 @Override
102 public boolean isHidden(Path path) throws IOException {
103 return false;
104 }
105
106 @Override
107 public FileStore getFileStore(Path path) throws IOException {
108 return null;
109 }
110
111 @Override
112 public void checkAccess(Path path, AccessMode... modes) throws IOException {
113
114 }
115
116 @Override
117 public <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type,
118 LinkOption... options) {
119 return null;
120 }
121
122 @Override
123 public <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type,
124 LinkOption... options) throws IOException {
125 return null;
126 }
127
128 @Override
129 public Map<String, Object> readAttributes(Path path, String attributes,
130 LinkOption... options) throws IOException {
131 return null;
132 }
133
134 @Override
135 public void setAttribute(Path path, String attribute, Object value, LinkOption... options)
136 throws IOException {
137
138 }
139}