#I am trying to implement a simple FTP Client and Server program

5 messages · Page 1 of 1 (latest)

tropic rose
#

Everything is working fine but for some reason, when I use the 'ls' command, the Server.java and Server.class files are not being shown. Here's the code for my ls part, I am able to see other class files and text files but just not the server files.

else if (line.equals("ls")) {
try{
DirectoryStream<Path> directoryStream = Files.newDirectoryStream(path);
for(Path entry: directoryStream)
out.writeBytes(entry.getFileName() + "\n");
out.writeBytes("\n");
}
catch(Exception e){
out.writeBytes("Invalid command");
}

                }
gleaming hareBOT
#

This post has been reserved for your question.

Hey @tropic rose! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

tropic rose
#

Would really appreciate some help

gleaming hareBOT
#

<@&765578700724371486>

Requested by ghostly#7570