11package com .groupdocs .ui .servlet ;
22
33import com .fasterxml .jackson .databind .ObjectMapper ;
4- import com .groupdocs .annotation .domain .AnnotationReplyInfo ;
5- import com .groupdocs .annotation .domain .results .AddReplyResult ;
6- import com .groupdocs .annotation .domain .results .GetAnnotationResult ;
7- import com .groupdocs .annotation .handler .AnnotationImageHandler ;
84import com .groupdocs .ui .Utils ;
95
106import javax .servlet .ServletException ;
139import javax .servlet .http .HttpServletRequest ;
1410import javax .servlet .http .HttpServletResponse ;
1511import java .io .IOException ;
16- import java .nio .file .*;
12+ import java .nio .file .Files ;
13+ import java .nio .file .Paths ;
1714import java .util .ArrayList ;
1815
1916@ WebServlet ("/files" )
@@ -22,10 +19,11 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t
2219 response .setHeader ("Content-Type" , "application/json" );
2320
2421 ArrayList <String > list = new ArrayList <>();
25- Files .newDirectoryStream (Paths .get (Utils .getStoragePath ())).forEach (path -> {
26- if (Files .isRegularFile (path )) {
27- list .add (path .getFileName ().toString ());
28- }
22+ Files .newDirectoryStream (
23+ Paths .get (Utils .getStoragePath ()),
24+ entry -> Files .isRegularFile (entry ) && !entry .getFileName ().toString ().startsWith ("GroupDocs." ) && !entry .getFileName ().toString ().equalsIgnoreCase ("README.txt" )
25+ ).forEach (path -> {
26+ list .add (path .getFileName ().toString ());
2927 });
3028
3129 new ObjectMapper ().writeValue (response .getOutputStream (), list );
0 commit comments