In this video.
Let's see how we can truncate a text.
TRUNCATE simply means that removing a portion of a text from the existing one.
So back to visual code.
So let's comment this one out.
And now bring this one here is going to be as truncate.
A file.
So here we go.
Bring in F.
S and then truncate.
And as usual, we pass in the file that we want to truncate.
So I want to truncate the index because the text is too much here.
So I want to truncate this particular text here.
So on that our pass in.
I'll pass in the index, darts, a timer, and then how many characters I want to truncate?
Let's say 30 characters.
And now.
And next is my callback function as usual.
So if there are some error.
And here you go console lock the error.
Otherwise you console log says that file truncated.
Okay, so have a look.
Let's run the application.
And let me clear the console first and run application.
Indeed, the content has been truncated having this content.
That is how it works.
The next video.
Let's see how we can get some statistics about a file.