/******************************************************************************************************************* * * {@inheritDoc} * ******************************************************************************************************************/ @Override @Nonnull public synchronized FileSystem getFileSystem() throws IOException { if (fileSystem == null) { try { fileSystem = new LocalFileSystem(); fileSystem.setRootDirectory(new File(rootPath)); final FileObject rootFolder = fileSystem.getRoot(); if (rootFolder == null) { throw new FileNotFoundException(rootPath); } } catch (PropertyVetoException e) { throw new FileNotFoundException(e.toString()); } } return fileSystem; } }
/******************************************************************************************************************* * * {@inheritDoc} * ******************************************************************************************************************/ @Override @Nonnull public synchronized ResourceFileSystem getFileSystem() throws IOException { if (fileSystem == null) { try { fileSystemDelegate = new LocalFileSystem(); fileSystemDelegate.setRootDirectory(new File(rootPath)); final FileObject rootFolder = fileSystemDelegate.getRoot(); if (rootFolder == null) { throw new FileNotFoundException(rootPath); } fileSystem = new ResourceFileSystemNetBeansPlatform(fileSystemDelegate); } catch (PropertyVetoException e) { throw new FileNotFoundException(e.toString()); } } return fileSystem; } }