public String createDoc(int port) {
        String result = "";
        switch (command) {
            case "GET":
                FileSystemManager fileSystemManager = new FileSystemManager(filePath);
                switch (fileSystemManager.checkFile()) {
                    case DIRECTORY:
                        try {
                            fileSystemManager.listFiles();
                        } catch (FileNotFoundException fe) {
                            throw new IllegalArgumentException();
                        }
                        dirMap = fileSystemManager.getDirMap();
                        fileSizeMap = fileSystemManager.getFileSizeMap();
                        fileMap = fileSystemManager.getFileMap();

                        final List<String> listD = new ArrayList<>(dirMap.keySet());
                        Collections.sort(listD, new Comparator<String>() {
                            public int compare(String o1, String o2) {
                                return (dirMap.get(o2)).compareTo(dirMap.get(o1));
                            }
                        });

                        final List<String> listF = new ArrayList<>(fileMap.keySet());
                        Collections.sort(listF);
                        Collections.sort(listF, new Comparator<String>() {
                            public int compare(String o1, String o2) {
                                return (fileMap.get(o2)).compareTo(fileMap.get(o1));
                            }
                        });


                        if (fileMap.keySet().contains("index.html")) {
                            try {
                                result = FileSystemReader.readTextFile(filePath + File.separator + "index.html");
                            } catch (FileNotFoundException e) {
                                e.printStackTrace();
                            }

                        } else {
                            result = new ContentBuilder().buildHtml(port, dirMap, fileMap, fileSizeMap,
                                    path, pathRoot, makeRoot);

                        }
                        return result;


                    case FILE:
                        //result = null;
                        return result;

                    case ERROR:
                        return result;

                }

                break;
            case "HEAD":
                return result;

        }
        return result;
    }