Okay.
So in this lecture Edna tried to develop this functionality which is upload to happen.
So what do you want to be.
You want to get a list of files from here in the Windows machine.
Then you want to send this list of files to overhead per machine.
The hacker will then specify which files it wants to download or which file and then we can come here
and then download.
And so we read that file contents in the temple name and then send these content to overhead code wishing
and then hacker can download it.
So let's move step by step.
So the first step is to get on the list of data to find in our present working that actually.
So our present working directory this one which is become final value.
And so what we want to do is we want to get a list of ones present in this one.
So it has two files called download or JPEG and may not go.
So we can use.
I you will not read the link to function.
So this one time we've done an array of file objects presented in this directly search will return to
me if I loved it.
So when you don't overdue pointing to code one will be pointing to download a JPEG and the will be pointing
to mean don't go in order to get the list of contents in the present that you can use that dot as a
directory name so dot represents the present or embedded in.
You don't have to specify any hard core value for it and then it will return an array of file objects.
So I am going to call it finds a way and then it is going to return and edit so at the moment I'm just
going to ignore it and others I don't have to write handling statements but I will assume that everything
works perfectly.
But you can put these errors chickens as well.
But in order to make your program more safe and reliable.
So when you have filed a object the next step is to arbitrate over this.
They object so this file that it contains an array of wild objects pointing to these two things.
So let's say so let's use a for loop so for index and then file object decodes to change and then find
a way.
So we will adhere to what each file object successively.
So the next thing we want to do is if we is at the moment we are only interested in files.
We are not interested in directories so we can put a check here that we only want to save.
These are file names.
So to do this we can use file that mall operator.
So find out more.
So this will be done and filing more object.
So find the mode and this will return an object.
Okay.
And then we can use this more object to determine if it's a directory or file so what do you want to
do is we want to put an if statement.
So if more dot so you can see the various additions here.
So first one this is triangular and is directly in neutral and a type of rule.
So it means that if the file if the current file object is the pointing to a file which is a regular
file then it will return true.
And if it's pointing to a directory then this function will return true.
So since you're only interested in files we can say is regular and once we have that what we need to
do is you need to store the file names in something.
So let's create an array.
So it s I'm going to call it finds a list of just what it is.
Okay.
And it's going to be an area of type String.
The next thing you want to do is you want to store file names in this files straight away.
So to do this you can use append update.
So append operator appends this to buy ins and then what do you want to append since we want to append
the file name when we can use file name.
And this will return an and this will append the point to this point.
So now you have everything set up.
I just want to paint backslash B and then I'm going to call it fine.
Mm hmm.
Let s go on it for I mean window.
Me.
So you saw in this statement that that's just an index is a.
So that's on the index
and then the final score.
Yes.
T.
Okay.
So everything is perfect.
So now we have a list of files in the next lecture that we will send this list off my list.
Well what kind of machine.