Interface ContentProvider
-
- All Known Implementing Classes:
FileContentProvider
,MixedContentProvider
,SubdirectoryDecorator
public interface ContentProvider
Represents some content provider - it is used by IprSettings code to obtain content of project files, iml files and so on. In fact, it is really light interface to VCS or to filesystem. The implementation of the interface should be fed to IdeaSettings class.- See Also:
IdeaSettings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStream
getContent(String relativePath)
Get a content of the file from data source represented by this content provider.List<VcsItem>
listItems(String relativePath)
List available items for given path (both files and directories)
-
-
-
Method Detail
-
getContent
@Nullable InputStream getContent(@Nullable String relativePath) throws VcsException, FileNotFoundException
Get a content of the file from data source represented by this content provider.- Parameters:
relativePath
- path for the requested item- Returns:
- input stream for the data located for the given path. input stream should be closed by the calling code
- Throws:
FileNotFoundException
- when there is no file for the given relative pathVcsException
- when there is some error while obtaining input file for the requested file
-
listItems
@NotNull List<VcsItem> listItems(@NotNull String relativePath) throws VcsException, FileNotFoundException
List available items for given path (both files and directories)- Parameters:
relativePath
- path for the requested directory- Returns:
- list of items available for the given path. Root path is represented by "." or empty string
- Throws:
FileNotFoundException
- when there is no file for the given relative pathVcsException
- when there is some error while obtaining list of sub-items
-
-