Class SubdirectoryDecorator

    • Constructor Detail

      • SubdirectoryDecorator

        public SubdirectoryDecorator​(@NotNull
                                     ContentProvider provider,
                                     @Nullable
                                     String prefix)
    • Method Detail

      • getContent

        public InputStream getContent​(@Nullable
                                      String relativePath)
                               throws VcsException,
                                      FileNotFoundException
        Description copied from interface: ContentProvider
        Get a content of the file from data source represented by this content provider.
        Specified by:
        getContent in interface ContentProvider
        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:
        VcsException - when there is some error while obtaining input file for the requested file
        FileNotFoundException - when there is no file for the given relative path
      • listItems

        public List<VcsItem> listItems​(@NotNull
                                       String relativePath)
                                throws VcsException,
                                       FileNotFoundException
        Description copied from interface: ContentProvider
        List available items for given path (both files and directories)
        Specified by:
        listItems in interface ContentProvider
        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:
        VcsException - when there is some error while obtaining list of sub-items
        FileNotFoundException - when there is no file for the given relative path