Interface FolderRepository

    • Method Detail

      • listFolders

        List<FileData> listFolders​(String path)
                            throws IOException
        Return a list of folders in the given path (not recursively).
        Parameters:
        path - the folder to scan. The path must be ended by '/' or be empty.
        Returns:
        the list of the folder descriptors. Invalid folders are ignored.
        Throws:
        IOException - if not possible to read the directory.
      • listFiles

        List<FileData> listFiles​(String path,
                                 String version)
                          throws IOException
        Return a list of files recursively in the given folder and given version.
        Parameters:
        path - the folder to scan. The path must be ended by '/' or be empty.
        version - the version of the folder to read, can be null.
        Returns:
        the list of the file descriptors. Invalid files are ignored.
        Throws:
        IOException - if not possible to read the directory.
      • save

        FileData save​(FileData folderData,
                      Iterable<FileItem> files,
                      ChangesetType changesetType)
               throws IOException
        Save the folder.
        Parameters:
        folderData - folder descriptor
        files - all files inside the folder recursively or only changed (modified, added, deleted) files depending on changesetType
        changesetType - if ChangesetType.DIFF, only changed files. If ChangesetType.FULL all files that exist in project
        Returns:
        the resulted folder descriptor after successful writing.
        Throws:
        IOException - if not possible to save the folder.