1 00:00:00,660 --> 00:00:02,560 File Matthau's in Biton. 2 00:00:03,150 --> 00:00:05,460 So there are so many different methods out there. 3 00:00:05,820 --> 00:00:08,580 And depending upon the input argument, variation. 4 00:00:08,910 --> 00:00:10,500 Different methods are the same. 5 00:00:10,500 --> 00:00:13,350 Methods may have different implications. 6 00:00:13,710 --> 00:00:19,020 So here in this video, we shall be discussing different file methods in Python. 7 00:00:20,210 --> 00:00:22,360 So here we are having some list of. 8 00:00:22,880 --> 00:00:24,770 So let me discuss some of them at least. 9 00:00:25,220 --> 00:00:30,230 So this is the method name and there is a description so close, close and open. 10 00:00:30,230 --> 00:00:30,670 Fine. 11 00:00:31,070 --> 00:00:34,880 And it has no effect if the file is already closed. 12 00:00:35,540 --> 00:00:36,890 Detach separate. 13 00:00:36,890 --> 00:00:42,410 The underlying binary buffer from the text are your best and return it. 14 00:00:43,010 --> 00:00:45,200 Next one is a file, a no return. 15 00:00:45,200 --> 00:00:46,540 An indigent no. 16 00:00:46,730 --> 00:00:49,340 There is a file descriptor of the file. 17 00:00:49,670 --> 00:00:52,060 So each and every file we need to get append. 18 00:00:52,460 --> 00:00:56,470 Then it will be accessed with some file descriptor number. 19 00:00:56,690 --> 00:00:58,130 So that number will be returned. 20 00:00:58,340 --> 00:01:01,790 So using this method file in all that is a file number. 21 00:01:02,100 --> 00:01:06,290 We're having this flash floods, the right buffer of the file stream. 22 00:01:06,470 --> 00:01:09,590 So what about what characters are there in the in the buffer. 23 00:01:09,590 --> 00:01:09,800 Right. 24 00:01:09,800 --> 00:01:10,160 Buffer. 25 00:01:10,310 --> 00:01:11,330 So they'll be cleared. 26 00:01:11,840 --> 00:01:14,120 Our next one is there is a two way. 27 00:01:14,480 --> 00:01:18,110 So it returns to the file stream is interactive. 28 00:01:18,740 --> 00:01:22,820 So read n read at most in characters from the file. 29 00:01:23,210 --> 00:01:25,310 Read till end of the file. 30 00:01:25,430 --> 00:01:27,760 If it is a niggly or none. 31 00:01:28,280 --> 00:01:29,540 We're having this readable. 32 00:01:29,750 --> 00:01:33,320 So returns true if the file stream can be read from. 33 00:01:33,380 --> 00:01:34,310 So that is a readable. 34 00:01:34,550 --> 00:01:36,400 Will be returning boolean. 35 00:01:36,560 --> 00:01:39,080 So either it will return true or false. 36 00:01:39,530 --> 00:01:42,260 So read line in is equal to minus one. 37 00:01:42,620 --> 00:01:48,560 So read and return one line from the file and reads in that most invites. 38 00:01:49,070 --> 00:01:50,330 If specified. 39 00:01:50,570 --> 00:01:52,000 So that is the invites are there. 40 00:01:52,360 --> 00:01:53,810 And this minus one is there. 41 00:01:54,080 --> 00:02:00,700 So read and return one line from the file and read at a reading at most invites. 42 00:02:01,280 --> 00:02:04,340 And if the N is specified in the parameter. 43 00:02:06,280 --> 00:02:09,220 We're having these red lines, but invisible to minus one. 44 00:02:09,550 --> 00:02:16,320 So read and return a list of lines from the file and read in at most invites our characters. 45 00:02:16,660 --> 00:02:23,470 If specified, then we're having this sick offset from is the girl to sick underscore set. 46 00:02:23,830 --> 00:02:31,600 So change the file perdition to offset bias in different to from that is a start current and end. 47 00:02:31,840 --> 00:02:37,900 So there is a file pointer will have some movement will have some progress depending upon the parameters. 48 00:02:37,960 --> 00:02:39,020 What about are past. 49 00:02:39,700 --> 00:02:40,820 Next one is a sequel. 50 00:02:41,080 --> 00:02:45,220 Returns true if the file stream supports random access. 51 00:02:45,370 --> 00:02:50,140 So if you can't go for the random accessing of the file content then need to return the output. 52 00:02:50,140 --> 00:02:50,370 True. 53 00:02:50,530 --> 00:02:51,850 So it returns boolean. 54 00:02:52,300 --> 00:02:55,840 So next one is a till he returns the current file location. 55 00:02:56,020 --> 00:02:59,890 So what is the where is the respective file point location to which location. 56 00:02:59,920 --> 00:03:03,310 It is pointing to the current location will be returned here. 57 00:03:03,760 --> 00:03:06,130 TRUNCATE site is equal to N one. 58 00:03:06,340 --> 00:03:09,180 So this is the file stream, two site bytes. 59 00:03:09,490 --> 00:03:14,230 And if the site is not specified, research to current location. 60 00:03:14,570 --> 00:03:16,510 We're having this rateable returns. 61 00:03:16,510 --> 00:03:19,420 True if the files team can be written to. 62 00:03:19,630 --> 00:03:24,430 So in the so you are having different functions that are methods that you can easily pause the video 63 00:03:24,640 --> 00:03:25,570 and go through them. 64 00:03:25,990 --> 00:03:29,370 And obviously we shall we shall write some calls on them. 65 00:03:31,470 --> 00:03:37,430 So here to see if previously we had red lines, so here that were in that case, we had ended the goal 66 00:03:37,440 --> 00:03:40,350 to minus one, but here you see in is again two point one. 67 00:03:40,590 --> 00:03:42,270 So what are their respective changes? 68 00:03:42,480 --> 00:03:45,630 They're having almost the same methods, the same method lists are there. 69 00:03:45,960 --> 00:03:48,770 But the input parameters are getting deferred. 70 00:03:48,990 --> 00:03:51,330 So what does that changes, respectively? 71 00:03:51,630 --> 00:03:57,650 That has been depicted in this method and that description column Bill returns the current file Lukash 72 00:03:57,660 --> 00:04:03,540 on, say, December, because we're not passing any parameter to that truncate scientifical two in one. 73 00:04:03,720 --> 00:04:06,560 So this saves the file stream to site bytes. 74 00:04:06,840 --> 00:04:11,400 If the site is not specified, it S.H. to the current location. 75 00:04:11,730 --> 00:04:17,050 So in this way, in this video, we Becka's different file methods available in bipartite. 76 00:04:17,610 --> 00:04:18,840 Thanks for watching this video.