Our goal would be to use this folder to create a zip file so we will do this whole process in another
for our functions.
And I am going to call this function as you write.
So what this function will lose.
It will take certain arguments and then it will write those the folder into the local disk which is
here.
So it will take to our memories.
The first one would be the base for the and the other one would be the file name on output five new
right.
It would also be of type String and then
the two okay.
So what we can do is we can call this folder.
This function deflator here so I can to zip right the and then it requires the folder base for that
which would be this one name to download
for the name to download.
And then it requires a file and the name of the zip file.
So I want to name the zip file as the same name as this folder.
So I'm going to go for the name to download plus and then I'm going to add dot zip into it so it would
be the same name for example.
So core then this name to download would be called and the file name would be called art.
So that said and then we will proceed into zipping the file.
So since we have a little base and for that and output file name what we can do is we can create a new
file using this output fighting name.
So I'm going to use was the create and then I'm going to use the.
Oh good.
Finally so this will create an empty file under disk and then it will write the contents into it.
So in 2010 an object called output for a
then we can check for that if uh is not equal to then we can say that if different and that we can simply
print the header and then we proceed for that.
Our next goal would be to use this outline.
But before doing this I need to close this outright
so we don't have any problem later on.
So now we have successfully handled the closure of this file.
Now we need to proceed for that.
Our next step would be to create a Zippo lighter.
So I'm going to be a C so you can see not nude either.
So what this function will lose that it will create a new item that can be used to write the zip files
so to do this.
It requires an input output reader.
So where do we want our files to be written.
So we want to use this output file as an initial data for this file and then I'm going to finally see
it right that
okay.
Our next step would be to add zip files to this the operator to do this I'm going to create a function
called add files to the
so I will get the functionality of this format later but I'm just going to show you how this function
will work.
So it will require two things tweeting so be the first one would be zip right.
The second one would be the base folder so base for love.
We have already defined
this form the
and then it is going to require a third element which would be string and I will explain later what
this string represents and once we have it we can simply.
We can see
if there is an
if there is not.
We can simply uh expose to say I don't close.
Who do they go
right.
The close so now you want to close this data properly as well.
And if it's not closed properly if it is not in them then you can simply print out.
So now our stand please complete our next step.
And our last step is just to add files to this zip file that we have already created in the next lecture.
We will proceed with this.