1 00:00:00,630 --> 00:00:07,320 File method's in Biton, so there are so many different methods out there, and depending upon the input 2 00:00:07,320 --> 00:00:13,320 argument, very different methods are the same methods may have different implications. 3 00:00:13,680 --> 00:00:19,050 So here in this video, we shall be discussing different file methods in Python. 4 00:00:20,180 --> 00:00:26,030 So here we are having some list of methods like we discussed, some of them at least, so this is the 5 00:00:26,030 --> 00:00:33,200 method name and there is a description so close, close and open file, and it has no effect if the 6 00:00:33,200 --> 00:00:36,890 file is already closed, detach, separate. 7 00:00:36,890 --> 00:00:42,410 The underlying binary buffer from the text are your best and return it. 8 00:00:42,950 --> 00:00:45,950 Next one is a file, a no return, an integer. 9 00:00:45,950 --> 00:00:49,370 No, there is a file descriptor of the file. 10 00:00:49,640 --> 00:00:56,510 So each and every file we need to get opened, then it will be accessed with some file descriptor number 11 00:00:56,630 --> 00:00:58,140 so that number will be returned. 12 00:00:58,280 --> 00:01:00,620 So using this method file A.. 13 00:01:00,800 --> 00:01:01,790 That is a file number. 14 00:01:02,000 --> 00:01:06,310 We are having this flash floods, the right buffer of the file stream. 15 00:01:06,410 --> 00:01:10,220 So whatever characters are there in the in the buffer, right buffer. 16 00:01:10,250 --> 00:01:11,360 So they will be cleared. 17 00:01:11,730 --> 00:01:14,110 Our next one is there is a two way. 18 00:01:14,420 --> 00:01:18,110 So returns to the file stream is interactive. 19 00:01:18,710 --> 00:01:22,820 So read in read at most in characters from the file. 20 00:01:23,120 --> 00:01:30,350 Read till end of the file if it is a negative or none when having this readable returns. 21 00:01:30,350 --> 00:01:36,370 True, if the file stream can be read from so that is a readable will be returning boolean. 22 00:01:36,500 --> 00:01:39,070 So either it will return true or false. 23 00:01:39,470 --> 00:01:42,250 So red line in is equal to minus one. 24 00:01:42,560 --> 00:01:50,360 So read and return one line from the file and reads in that most invites if specified. 25 00:01:50,480 --> 00:01:53,810 So that is the invites are there and this minus one is there. 26 00:01:53,990 --> 00:02:03,230 So read and return one line from the file and read at the reading at most invites and if the N is specified 27 00:02:03,230 --> 00:02:04,370 in the parameter. 28 00:02:06,190 --> 00:02:12,430 We're having these red lines where in Israel, minus one, so read and return and list of lines from 29 00:02:12,430 --> 00:02:20,200 the file and read in at most invites or characters if specified, then we're having this sick of upset 30 00:02:20,320 --> 00:02:23,490 from Israel to sick underscores set. 31 00:02:23,770 --> 00:02:31,630 So change the file position to offset bias in reference to from that is a stark current and end. 32 00:02:31,780 --> 00:02:37,930 So that is a file point pointer will have some movement will have some progress depending upon the parameters. 33 00:02:37,930 --> 00:02:45,210 Whatever we are passed next one is unthinkable returns true if the file stream supports random access. 34 00:02:45,310 --> 00:02:50,680 So if we can go for the random accessing of the file content then it will return the output route so 35 00:02:50,680 --> 00:02:51,830 it returns boolean. 36 00:02:52,240 --> 00:02:55,850 So the next one is still returns according to file location. 37 00:02:55,960 --> 00:03:00,970 So where is the where is the respective file pointer location to which location it is pointing to. 38 00:03:01,180 --> 00:03:03,400 The current location will be returned here. 39 00:03:03,730 --> 00:03:06,100 Trunked site is in one. 40 00:03:06,280 --> 00:03:09,220 So this is the file stream to site bytes. 41 00:03:09,400 --> 00:03:16,510 And if the site is not specified research to current location, we're having this writable returns. 42 00:03:16,510 --> 00:03:22,420 True, if the files can be returned to so industry that having different functions of their methods 43 00:03:22,430 --> 00:03:25,570 are that you can easily pause the video and go through them. 44 00:03:25,900 --> 00:03:29,410 And obviously we shall we shall write some calls on them. 45 00:03:31,410 --> 00:03:38,180 So here you see in previously we had red lines, so here that in that case we had any minus one. 46 00:03:38,190 --> 00:03:40,360 But here is the end is a two point one. 47 00:03:40,530 --> 00:03:42,270 So what are the respective changes? 48 00:03:42,420 --> 00:03:44,850 We're having almost the same method, the same method. 49 00:03:44,850 --> 00:03:48,790 Lists are there, but the input parameters are getting different. 50 00:03:48,930 --> 00:03:53,790 So what is the changes respectively that has been depicted in this method? 51 00:03:53,910 --> 00:03:57,730 And that description still returns the current file location. 52 00:03:57,760 --> 00:04:03,510 So it's the same because we are not passing any parameter to that trunked Seijas in one. 53 00:04:03,660 --> 00:04:06,960 So this is the file stream to sideswipes it. 54 00:04:06,970 --> 00:04:08,670 The site is not specified. 55 00:04:08,850 --> 00:04:11,410 It is to the current location. 56 00:04:11,670 --> 00:04:17,100 So in this way, in this video, we have discussed different file methods available in Python. 57 00:04:17,580 --> 00:04:18,840 Thanks for watching this video.