1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.vfs2.impl;
18
19 import java.io.File;
20 import java.lang.reflect.Constructor;
21 import java.net.URI;
22 import java.net.URISyntaxException;
23 import java.net.URL;
24 import java.net.URLStreamHandler;
25 import java.net.URLStreamHandlerFactory;
26 import java.util.ArrayList;
27 import java.util.Arrays;
28 import java.util.Collection;
29 import java.util.HashMap;
30 import java.util.List;
31 import java.util.Map;
32
33 import org.apache.commons.lang3.ArrayUtils;
34 import org.apache.commons.logging.Log;
35 import org.apache.commons.logging.LogFactory;
36 import org.apache.commons.vfs2.CacheStrategy;
37 import org.apache.commons.vfs2.Capability;
38 import org.apache.commons.vfs2.FileContentInfoFactory;
39 import org.apache.commons.vfs2.FileName;
40 import org.apache.commons.vfs2.FileObject;
41 import org.apache.commons.vfs2.FileSystem;
42 import org.apache.commons.vfs2.FileSystemConfigBuilder;
43 import org.apache.commons.vfs2.FileSystemException;
44 import org.apache.commons.vfs2.FileSystemManager;
45 import org.apache.commons.vfs2.FileSystemOptions;
46 import org.apache.commons.vfs2.FileType;
47 import org.apache.commons.vfs2.FilesCache;
48 import org.apache.commons.vfs2.NameScope;
49 import org.apache.commons.vfs2.VFS;
50 import org.apache.commons.vfs2.cache.SoftRefFilesCache;
51 import org.apache.commons.vfs2.operations.FileOperationProvider;
52 import org.apache.commons.vfs2.provider.AbstractFileName;
53 import org.apache.commons.vfs2.provider.AbstractFileProvider;
54 import org.apache.commons.vfs2.provider.DefaultURLStreamHandler;
55 import org.apache.commons.vfs2.provider.FileProvider;
56 import org.apache.commons.vfs2.provider.FileReplicator;
57 import org.apache.commons.vfs2.provider.LocalFileProvider;
58 import org.apache.commons.vfs2.provider.TemporaryFileStore;
59 import org.apache.commons.vfs2.provider.UriParser;
60 import org.apache.commons.vfs2.provider.VfsComponent;
61
62
63
64
65 public class DefaultFileSystemManager implements FileSystemManager {
66
67
68
69
70 final class VfsStreamHandlerFactory implements URLStreamHandlerFactory {
71 @Override
72 public URLStreamHandler createURLStreamHandler(final String protocol) {
73 final FileProvider provider = providers.get(protocol);
74 if (provider != null) {
75 return new DefaultURLStreamHandler(context);
76 }
77
78
79 return new URLStreamHandlerProxy();
80 }
81 }
82
83
84
85
86 private final Map<String, FileProvider> providers = new HashMap<>();
87
88
89
90
91 private final List<String> virtualFileSystemSchemes = new ArrayList<>();
92
93
94
95
96 private final ArrayList<Object> components = new ArrayList<>();
97
98
99
100
101 private final DefaultVfsComponentContext context = new DefaultVfsComponentContext(this);
102
103
104
105
106 private final Map<String, List<FileOperationProvider>> operationProviders = new HashMap<>();
107
108
109
110
111 private final FileTypeMap typeMap = new FileTypeMap();
112
113
114
115
116 private LocalFileProvider localFileProvider;
117
118
119
120
121 private FileProvider defaultProvider;
122
123
124
125
126 private FileReplicator fileReplicator;
127
128
129
130
131 private FileObject baseFile;
132
133
134
135
136 private FilesCache filesCache;
137
138
139
140
141 private CacheStrategy fileCacheStrategy;
142
143
144
145 private Class<?> fileObjectDecorator;
146
147
148
149
150 private Constructor<?> fileObjectDecoratorConst;
151
152
153
154
155 private FileContentInfoFactory fileContentInfoFactory;
156
157
158
159
160 private Log log = LogFactory.getLog(getClass());
161
162
163
164
165 private TemporaryFileStore tempFileStore;
166
167
168
169
170 private VirtualFileProvider vfsProvider;
171
172
173
174
175 private boolean init;
176
177
178
179
180 public DefaultFileSystemManager() {
181
182 }
183
184
185
186
187
188
189
190
191
192 public void _closeFileSystem(final FileSystem fileSystem) {
193 final FileProvider provider = providers.get(fileSystem.getRootName().getScheme());
194 if (provider != null) {
195 ((AbstractFileProvider) provider).closeFileSystem(fileSystem);
196 } else if (fileSystem instanceof VirtualFileSystem) {
197
198 vfsProvider.closeFileSystem(fileSystem);
199 }
200 }
201
202
203
204
205
206
207
208 public void addExtensionMap(final String extension, final String scheme) {
209 typeMap.addExtension(extension, scheme);
210 }
211
212
213
214
215
216
217
218 public void addMimeTypeMap(final String mimeType, final String scheme) {
219 typeMap.addMimeType(mimeType, scheme);
220 }
221
222
223
224
225
226
227
228
229
230
231 @Override
232 public void addOperationProvider(final String scheme, final FileOperationProvider operationProvider)
233 throws FileSystemException {
234 addOperationProvider(new String[] {scheme}, operationProvider);
235 }
236
237
238
239
240
241
242
243 @Override
244 public void addOperationProvider(final String[] schemes, final FileOperationProvider operationProvider)
245 throws FileSystemException {
246 for (final String scheme : schemes) {
247 final List<FileOperationProvider> providers = operationProviders.computeIfAbsent(scheme, k -> new ArrayList<>());
248
249 if (providers.contains(operationProvider)) {
250 throw new FileSystemException("vfs.operation/operation-provider-already-added.error", scheme);
251 }
252
253 setupComponent(operationProvider);
254
255 providers.add(operationProvider);
256 }
257 }
258
259
260
261
262
263
264
265
266
267
268
269
270 public void addProvider(final String urlScheme, final FileProvider provider) throws FileSystemException {
271 addProvider(new String[] {urlScheme}, provider);
272 }
273
274
275
276
277
278
279
280
281
282
283
284
285 public void addProvider(final String[] urlSchemes, final FileProvider provider) throws FileSystemException {
286
287 for (final String scheme : urlSchemes) {
288 if (providers.containsKey(scheme)) {
289 throw new FileSystemException("vfs.impl/multiple-providers-for-scheme.error", scheme);
290 }
291 }
292
293
294 setupComponent(provider);
295
296
297 Arrays.stream(urlSchemes).forEach(scheme -> providers.put(scheme, provider));
298
299 if (provider instanceof LocalFileProvider && localFileProvider == null) {
300 localFileProvider = (LocalFileProvider) provider;
301 }
302 }
303
304
305
306
307
308
309 protected void addVirtualFileSystemScheme(String rootUri) {
310 if (rootUri.indexOf(':') != -1) {
311 rootUri = rootUri.substring(0, rootUri.indexOf(':'));
312 }
313 virtualFileSystemSchemes.add(rootUri);
314 }
315
316
317
318
319
320
321
322
323 @Override
324 public boolean canCreateFileSystem(final FileObject file) throws FileSystemException {
325 return typeMap.getScheme(file) != null;
326 }
327
328
329
330
331
332
333
334
335
336
337
338 @Override
339 public void close() {
340 if (!init) {
341 return;
342 }
343
344
345
346
347
348
349 providers.values().forEach(this::closeComponent);
350
351
352 closeComponent(vfsProvider);
353 closeComponent(fileReplicator);
354 closeComponent(tempFileStore);
355 closeComponent(defaultProvider);
356
357
358
359 providers.clear();
360
361
362 operationProviders.values().forEach(opProviders -> opProviders.forEach(this::closeComponent));
363
364
365 operationProviders.clear();
366
367
368 typeMap.clear();
369
370
371 closeComponent(filesCache);
372
373
374 if (!components.isEmpty()) {
375 log.warn("DefaultFilesystemManager.close: not all components are closed: " + components);
376 }
377 components.clear();
378
379
380 vfsProvider = null;
381
382
383 virtualFileSystemSchemes.clear();
384
385
386 defaultProvider = null;
387 baseFile = null;
388 fileObjectDecorator = null;
389 fileObjectDecoratorConst = null;
390 localFileProvider = null;
391 fileReplicator = null;
392 tempFileStore = null;
393
394 filesCache = null;
395 fileCacheStrategy = null;
396 fileContentInfoFactory = null;
397
398 init = false;
399 }
400
401
402
403
404
405
406 private void closeComponent(final Object component) {
407 if (component != null && components.contains(component)) {
408 if (component instanceof VfsComponent) {
409 ((VfsComponent) component).close();
410 }
411 components.remove(component);
412 }
413 }
414
415
416
417
418
419
420
421
422
423 @Override
424 public void closeFileSystem(final FileSystem fileSystem) {
425
426 getFilesCache().clear(fileSystem);
427
428
429 _closeFileSystem(fileSystem);
430 }
431
432
433
434
435
436
437
438
439 @Override
440 public FileObject createFileSystem(final FileObject file) throws FileSystemException {
441 final String scheme = typeMap.getScheme(file);
442 FileSystemException.requireNonNull(scheme, "vfs.impl/no-provider-for-file.error", file);
443 return createFileSystem(scheme, file);
444 }
445
446
447
448
449
450
451
452
453
454 @Override
455 public FileObject createFileSystem(final String scheme, final FileObject file) throws FileSystemException {
456 final FileProvider provider = providers.get(scheme);
457 FileSystemException.requireNonNull(provider, "vfs.impl/unknown-provider.error", scheme, file);
458 return provider.createFileSystem(scheme, file, file.getFileSystem().getFileSystemOptions());
459 }
460
461
462
463
464
465
466
467
468 @Override
469 public FileObject createVirtualFileSystem(final FileObject rootFile) throws FileSystemException {
470 final FileObject fileObject = vfsProvider.createFileSystem(rootFile);
471 addVirtualFileSystemScheme(rootFile.getName().getScheme());
472 return fileObject;
473 }
474
475
476
477
478
479
480
481
482 @Override
483 public FileObject createVirtualFileSystem(final String rootUri) throws FileSystemException {
484 final FileObject fileObject = vfsProvider.createFileSystem(rootUri);
485 addVirtualFileSystemScheme(rootUri);
486 return fileObject;
487 }
488
489
490
491
492 public void freeUnusedResources() {
493 if (!init) {
494 return;
495 }
496
497
498 providers.values().forEach(fileProvider -> {
499 if (fileProvider instanceof AbstractFileProvider) {
500 ((AbstractFileProvider) fileProvider).freeUnusedResources();
501 }
502 });
503
504 }
505
506
507
508
509
510
511
512 @Override
513 public FileObject getBaseFile() throws FileSystemException {
514 return baseFile;
515 }
516
517
518
519
520
521
522 @Override
523 public CacheStrategy getCacheStrategy() {
524 return fileCacheStrategy;
525 }
526
527
528
529
530
531
532 @Override
533 public FileContentInfoFactory getFileContentInfoFactory() {
534 return fileContentInfoFactory;
535 }
536
537
538
539
540
541
542 @Override
543 public Class<?> getFileObjectDecorator() {
544 return fileObjectDecorator;
545 }
546
547
548
549
550
551
552 @Override
553 public Constructor<?> getFileObjectDecoratorConst() {
554 return fileObjectDecoratorConst;
555 }
556
557
558
559
560
561
562 @Override
563 public FilesCache getFilesCache() {
564 return filesCache;
565 }
566
567
568
569
570
571
572
573
574 @Override
575 public FileSystemConfigBuilder getFileSystemConfigBuilder(final String scheme) throws FileSystemException {
576 final FileProvider provider = providers.get(scheme);
577 FileSystemException.requireNonNull(provider, "vfs.impl/unknown-scheme.error", scheme);
578 return provider.getConfigBuilder();
579 }
580
581
582
583
584
585
586
587
588
589
590
591 private LocalFileProvider getLocalFileProvider() throws FileSystemException {
592 return FileSystemException.requireNonNull(localFileProvider, "vfs.impl/no-local-file-provider.error");
593 }
594
595
596
597
598
599
600 protected Log getLogger() {
601 return log;
602 }
603
604
605
606
607
608
609
610
611 @Override
612 public FileOperationProvider[] getOperationProviders(final String scheme) throws FileSystemException {
613
614 final List<?> providers = operationProviders.get(scheme);
615 if (providers == null || providers.isEmpty()) {
616 return null;
617 }
618 return providers.toArray(FileOperationProvider.EMPTY_ARRAY);
619 }
620
621
622
623
624
625
626
627
628 @Override
629 public Collection<Capability> getProviderCapabilities(final String scheme) throws FileSystemException {
630 final FileProvider provider = providers.get(scheme);
631 FileSystemException.requireNonNull(provider, "vfs.impl/unknown-scheme.error", scheme);
632 return provider.getCapabilities();
633 }
634
635
636
637
638
639
640
641 public FileReplicator getReplicator() throws FileSystemException {
642 return FileSystemException.requireNonNull(fileReplicator, "vfs.impl/no-replicator.error");
643 }
644
645
646
647
648
649
650 @Override
651 public String[] getSchemes() {
652 final List<String> schemes = new ArrayList<>(providers.size() + virtualFileSystemSchemes.size());
653 schemes.addAll(providers.keySet());
654 schemes.addAll(virtualFileSystemSchemes);
655 return schemes.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
656 }
657
658
659
660
661
662
663
664 public TemporaryFileStore getTemporaryFileStore() throws FileSystemException {
665 return FileSystemException.requireNonNull(tempFileStore, "vfs.impl/no-temp-file-store.error");
666 }
667
668
669
670
671
672
673 @Override
674 public URLStreamHandlerFactory getURLStreamHandlerFactory() {
675 return new VfsStreamHandlerFactory();
676 }
677
678
679
680
681
682
683
684 @Override
685 public boolean hasProvider(final String scheme) {
686 return providers.containsKey(scheme);
687 }
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702 public void init() throws FileSystemException {
703 if (fileContentInfoFactory == null) {
704 fileContentInfoFactory = new FileContentInfoFilenameFactory();
705 }
706
707 if (filesCache == null) {
708 filesCache = new SoftRefFilesCache();
709 }
710 if (fileCacheStrategy == null) {
711 fileCacheStrategy = CacheStrategy.ON_RESOLVE;
712 }
713 setupComponent(filesCache);
714
715 vfsProvider = new VirtualFileProvider();
716 setupComponent(vfsProvider);
717
718 init = true;
719 }
720
721
722
723
724
725
726
727 public void removeProvider(final String urlScheme) {
728 final FileProvider provider = providers.remove(urlScheme);
729
730 if (provider != null && !providers.containsValue(provider)) {
731 closeComponent(provider);
732 }
733 }
734
735
736
737
738
739
740
741
742
743
744
745
746 @Override
747 public FileObject resolveFile(final File baseFile, final String uri) throws FileSystemException {
748 return resolveFile(getLocalFileProvider().findLocalFile(baseFile), uri);
749 }
750
751
752
753
754
755
756
757
758
759 @Override
760 public FileObject resolveFile(final FileObject baseFile, final String uri) throws FileSystemException {
761 return resolveFile(baseFile, uri, baseFile == null ? null : baseFile.getFileSystem().getFileSystemOptions());
762 }
763
764
765
766
767
768
769
770
771
772
773 public FileObject resolveFile(final FileObject baseFile, final String uri,
774 final FileSystemOptions fileSystemOptions) throws FileSystemException {
775 final FileObject realBaseFile;
776 if (baseFile != null && VFS.isUriStyle() && baseFile.getName().isFile()) {
777 realBaseFile = baseFile.getParent();
778 } else {
779 realBaseFile = baseFile;
780 }
781
782
783 UriParser.checkUriEncoding(uri);
784
785 if (uri == null) {
786 throw new IllegalArgumentException();
787 }
788
789
790 final String scheme = UriParser.extractScheme(getSchemes(), uri);
791 if (scheme != null) {
792
793 final FileProvider provider = providers.get(scheme);
794 if (provider != null) {
795 return provider.findFile(realBaseFile, uri, fileSystemOptions);
796 }
797
798 }
799
800
801 if (localFileProvider != null && localFileProvider.isAbsoluteLocalName(uri)) {
802 return localFileProvider.findLocalFile(uri);
803 }
804
805 if (scheme != null) {
806
807 FileSystemException.requireNonNull(defaultProvider, "vfs.impl/unknown-scheme.error", scheme, uri);
808 return defaultProvider.findFile(realBaseFile, uri, fileSystemOptions);
809 }
810
811
812 FileSystemException.requireNonNull(realBaseFile, "vfs.impl/find-rel-file.error", uri);
813
814 return realBaseFile.resolveFile(uri);
815 }
816
817
818
819
820
821
822
823
824 @Override
825 public FileObject resolveFile(final String uri) throws FileSystemException {
826 return resolveFile(getBaseFile(), uri);
827 }
828
829
830
831
832
833
834
835
836
837
838 @Override
839 public FileObject resolveFile(final String uri, final FileSystemOptions fileSystemOptions)
840 throws FileSystemException {
841
842 return resolveFile(getBaseFile(), uri, fileSystemOptions);
843 }
844
845
846
847
848
849
850
851
852
853 @Override
854 public FileObject resolveFile(final URI uri) throws FileSystemException {
855
856 return resolveFile(baseFile, uri.toString(), null);
857 }
858
859
860
861
862
863
864
865
866
867 @Override
868 public FileObject resolveFile(final URL url) throws FileSystemException {
869 try {
870 return this.resolveFile(url.toURI());
871 } catch (final URISyntaxException e) {
872 throw new FileSystemException(e);
873 }
874 }
875
876
877
878
879
880
881
882
883
884
885
886 @Override
887 public FileName resolveName(final FileName root, final String path) throws FileSystemException {
888 return resolveName(root, path, NameScope.FILE_SYSTEM);
889 }
890
891
892
893
894
895
896
897
898
899
900 @Override
901 public FileName resolveName(final FileName base, final String name, final NameScope scope)
902 throws FileSystemException {
903 FileSystemException.requireNonNull(base, "Invalid base FileName.");
904 FileSystemException.requireNonNull(name, "Invalid name FileName.");
905 final FileName realBase;
906 if (VFS.isUriStyle() && base.isFile()) {
907 realBase = base.getParent();
908 } else {
909 realBase = base;
910 }
911
912 final StringBuilder buffer = new StringBuilder(name);
913
914
915 UriParser.fixSeparators(buffer);
916 String scheme = UriParser.extractScheme(getSchemes(), buffer.toString());
917
918
919 if (name.isEmpty() || scheme == null && buffer.charAt(0) != FileName.SEPARATOR_CHAR) {
920
921 if (!VFS.isUriStyle()) {
922
923 buffer.insert(0, FileName.SEPARATOR_CHAR);
924 }
925 buffer.insert(0, realBase.getPath());
926 }
927
928
929 final FileType fileType = UriParser.normalisePath(buffer);
930
931
932 final String resolvedPath = buffer.toString();
933 if (!AbstractFileName.checkName(realBase.getPath(), resolvedPath, scope)) {
934 throw new FileSystemException("vfs.provider/invalid-descendent-name.error", name);
935 }
936
937
938
939
940 final String trailingPathPart = fileType == FileType.FOLDER ? FileName.SEPARATOR : "";
941
942 final String fullPath;
943 if (scheme != null) {
944 fullPath = resolvedPath + trailingPathPart;
945 } else {
946 scheme = realBase.getScheme();
947 fullPath = realBase.getRootURI() + resolvedPath + trailingPathPart;
948 }
949 final FileProvider provider = providers.get(scheme);
950 if (provider != null) {
951
952
953
954
955
956
957 return provider.parseUri(realBase, fullPath);
958 }
959
960
961 if (scheme != null && defaultProvider != null) {
962 return defaultProvider.parseUri(realBase, fullPath);
963 }
964
965
966
967 return ((AbstractFileName) realBase).createName(resolvedPath, fileType);
968 }
969
970
971
972
973
974
975
976
977 @Override
978 public FileName resolveURI(final String uri) throws FileSystemException {
979 UriParser.checkUriEncoding(uri);
980
981 if (uri == null) {
982 throw new IllegalArgumentException();
983 }
984
985
986 final String scheme = UriParser.extractScheme(getSchemes(), uri);
987 if (scheme != null) {
988
989 final FileProvider provider = providers.get(scheme);
990 if (provider != null) {
991 return provider.parseUri(null, uri);
992 }
993
994
995 }
996
997
998 if (localFileProvider != null && localFileProvider.isAbsoluteLocalName(uri)) {
999 return localFileProvider.parseUri(null, uri);
1000 }
1001
1002 if (scheme != null) {
1003
1004 FileSystemException.requireNonNull(defaultProvider, "vfs.impl/unknown-scheme.error", scheme, uri);
1005 return defaultProvider.parseUri(null, uri);
1006 }
1007
1008
1009 FileSystemException.requireNonNull(baseFile, "vfs.impl/find-rel-file.error", uri);
1010
1011 return resolveName(baseFile.getName(), uri, NameScope.FILE_SYSTEM);
1012 }
1013
1014
1015
1016
1017
1018
1019
1020 public void setBaseFile(final File baseFile) throws FileSystemException {
1021 this.baseFile = getLocalFileProvider().findLocalFile(baseFile);
1022 }
1023
1024
1025
1026
1027
1028
1029 public void setBaseFile(final FileObject baseFile) {
1030 this.baseFile = baseFile;
1031 }
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045 public void setCacheStrategy(final CacheStrategy fileCacheStrategy) throws FileSystemException {
1046 if (init) {
1047 throw new FileSystemException("vfs.impl/already-inited.error");
1048 }
1049
1050 this.fileCacheStrategy = fileCacheStrategy;
1051 }
1052
1053
1054
1055
1056
1057
1058
1059
1060 public void setDefaultProvider(final FileProvider provider) throws FileSystemException {
1061 setupComponent(provider);
1062 defaultProvider = provider;
1063 }
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074 public void setFileContentInfoFactory(final FileContentInfoFactory fileContentInfoFactory)
1075 throws FileSystemException {
1076 if (init) {
1077 throw new FileSystemException("vfs.impl/already-inited.error");
1078 }
1079
1080 this.fileContentInfoFactory = fileContentInfoFactory;
1081 }
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093 public void setFileObjectDecorator(final Class<?> fileObjectDecorator) throws FileSystemException {
1094 if (init) {
1095 throw new FileSystemException("vfs.impl/already-inited.error");
1096 }
1097 if (!DecoratedFileObject.class.isAssignableFrom(fileObjectDecorator)) {
1098 throw new FileSystemException("vfs.impl/invalid-decorator.error", fileObjectDecorator.getName());
1099 }
1100
1101 try {
1102 fileObjectDecoratorConst = fileObjectDecorator.getConstructor(FileObject.class);
1103 } catch (final NoSuchMethodException e) {
1104 throw new FileSystemException("vfs.impl/invalid-decorator.error", fileObjectDecorator.getName(), e);
1105 }
1106
1107 this.fileObjectDecorator = fileObjectDecorator;
1108 }
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122 public void setFilesCache(final FilesCache filesCache) throws FileSystemException {
1123 if (init) {
1124 throw new FileSystemException("vfs.impl/already-inited.error");
1125 }
1126 this.filesCache = filesCache;
1127 }
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137 @Override
1138 public void setLogger(final Log log) {
1139 this.log = log;
1140 }
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151 public void setReplicator(final FileReplicator replicator) throws FileSystemException {
1152 setupComponent(replicator);
1153 fileReplicator = replicator;
1154 }
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165 public void setTemporaryFileStore(final TemporaryFileStore tempFileStore) throws FileSystemException {
1166 setupComponent(tempFileStore);
1167 this.tempFileStore = tempFileStore;
1168 }
1169
1170
1171
1172
1173
1174
1175
1176 private void setupComponent(final Object component) throws FileSystemException {
1177 if (!components.contains(component)) {
1178 if (component instanceof VfsComponent) {
1179 final VfsComponent vfsComponent = (VfsComponent) component;
1180 vfsComponent.setLogger(getLogger());
1181 vfsComponent.setContext(context);
1182 vfsComponent.init();
1183 }
1184 components.add(component);
1185 }
1186 }
1187
1188
1189
1190
1191
1192
1193
1194
1195 @Override
1196 public FileObject toFileObject(final File file) throws FileSystemException {
1197 return getLocalFileProvider().findLocalFile(file);
1198 }
1199
1200 }