@NotNull @Override public List<String> listSubFiles(@NotNull String fileSpec, @NotNull RoamingType roamingType) { if (myRoamingType == roamingType) { return Arrays.asList(myProvider.listSubFiles(fileSpec, roamingType)); } else { return Collections.emptyList(); } }
@Override public void saveContent( @NotNull String fileSpec, @NotNull byte[] content, int size, @NotNull RoamingType roamingType, boolean async) throws IOException { myProvider.saveContent( fileSpec, new BufferExposingByteArrayInputStream(content, size), size, roamingType, async); }
@Override public void delete(@NotNull String fileSpec, @NotNull RoamingType roamingType) { if (myRoamingType == roamingType) { myProvider.deleteFile(fileSpec, roamingType); } }
@Nullable @Override public InputStream loadContent(@NotNull String fileSpec, @NotNull RoamingType roamingType) throws IOException { return myRoamingType == roamingType ? myProvider.loadContent(fileSpec, roamingType) : null; }
@Override public boolean isEnabled() { return myProvider.isEnabled(); }