WEBVTT 00:00.620 --> 00:01.700 Hey guys welcome back. 00:01.690 --> 00:03.930 Welcome to you more in this morning. 00:03.930 --> 00:07.810 We'll be talking about science and by Tom or panhandling. 00:07.860 --> 00:10.400 So basically now we'll be dodging fines. 00:10.410 --> 00:16.770 That means really creating the next you find trying to act companies that are trying to delete content 00:17.190 --> 00:19.660 or just simply reading content trauma. 00:19.740 --> 00:22.070 It is exciting. 00:22.080 --> 00:28.020 You can also play with images and a lot more thing as you know all that data that we work on either 00:28.050 --> 00:30.530 stored in some database or in some files. 00:30.690 --> 00:37.260 So it is really important for us to understand how to open a file how to lose a file in ordering process 00:37.270 --> 00:43.080 that is in programming manner begin to Elaine for example suppose there isn't in this book. 00:43.260 --> 00:45.810 That is an ordinance sheet ordinance. 00:46.080 --> 00:52.960 If I need to search some names what I'm moved to I'm going to open that file search for that name. 00:53.010 --> 01:00.300 Read that content and then lose my find that all that stuff was is saying we need to follow in programming 01:00.360 --> 01:07.020 our computer language we need to bring a file then before the process of writing or reading what we 01:07.020 --> 01:08.500 want to do with that file. 01:08.730 --> 01:12.500 And then we disclose that file and that's all that simple. 01:12.720 --> 01:15.350 So before doing anything else we need to understand them. 01:15.390 --> 01:21.630 One important thing that there are some fine in finding five on one side and thinking one is binary 01:21.680 --> 01:29.490 files so text files usually contain all the XTi or any other files that is related to text and binary 01:29.490 --> 01:31.850 files usually contain all images. 01:31.890 --> 01:34.790 That is like being the case for GBG. 01:34.810 --> 01:42.090 So these are the files that contain or has values in type of bytes big SU something similar to that 01:42.420 --> 01:45.320 are always known as binary files. 01:45.420 --> 01:52.360 So it is very important for us to know how to create a file stored in a file and then do it up from 01:52.370 --> 01:53.750 all right and fine. 01:53.880 --> 01:56.510 So that's all we are going to do. 01:56.520 --> 01:57.950 Any operation on the file. 01:57.960 --> 02:05.460 First we need to know how to open a file and so forth that all we have to do is use a common open and 02:05.460 --> 02:11.840 then you have to boss who goes basically the first one is file name and the second one is called. 02:11.910 --> 02:15.560 So the first thing that we need to boss is our finding. 02:15.580 --> 02:20.320 Let me take an example file that this example or the XTi. 02:20.580 --> 02:23.900 I was thinking that I need to boss is my mood. 02:24.010 --> 02:30.360 That is if I'm opening this file for reading if I'm opening this file for writing if I'm opening this 02:30.360 --> 02:31.710 file for anything. 02:31.820 --> 02:34.710 So there are different modes that we need to understand. 02:34.770 --> 02:37.380 The first one is to do that is one writing. 02:37.380 --> 02:41.480 Second one is for reading that is on is what I've been. 02:41.490 --> 02:44.890 And there are a lot more we'll be discussing them in detail. 02:44.990 --> 02:49.260 The following lecture at this point of time just right you. 02:49.380 --> 02:55.770 Also if you are not seeing any value by default decongest are is for you. 02:56.310 --> 02:59.330 Now I can function well given as I. 02:59.490 --> 03:04.090 And we need to store that if we get an asset in the form or find object. 03:04.290 --> 03:07.460 And let me take a very strong this. 03:08.130 --> 03:15.390 And I'm calling this very well as I had this theory what is known as quite handy because it is storing 03:15.540 --> 03:16.480 file objects. 03:16.500 --> 03:19.860 That was done by this particular venue. 03:19.860 --> 03:27.000 Now if you want to perform anything when i example or the XTi that doesn't explain we'll be using file 03:27.010 --> 03:29.870 hand the same as we do with variable. 03:29.910 --> 03:36.860 If we have string in medieval we just use METAR sure that we will seem we are able to move in this particular 03:36.870 --> 03:39.220 way that is on edge. 03:39.270 --> 03:41.040 So our first task is done. 03:41.250 --> 03:43.020 We have all been fine. 03:43.080 --> 03:46.530 Now the second task is to depend on our more. 03:46.560 --> 03:49.420 So we have opened this file for writing. 03:49.520 --> 03:54.770 But you know I don't have any examples nor the XTi Howard is going to write any kind. 03:55.050 --> 03:57.390 So that's what is useful. 03:57.420 --> 04:00.450 So the means to write them down are fine. 04:00.600 --> 04:06.540 And if HDD is already present it will delete that data and right from the first line. 04:06.750 --> 04:09.500 And if there is no file it will create high end. 04:09.600 --> 04:13.270 So that's why we are using new that is for ribose. 04:13.320 --> 04:19.920 And let me add some kind and let me use my file ended up as a sage and now you see different types of 04:19.920 --> 04:26.990 methods that are available Bosshard news detach right right anyway. 04:27.250 --> 04:31.650 Granted there are many species that are also in use right. 04:31.860 --> 04:39.990 And had I need to provide content to add in my file this looks like I'm adding an anonymous poster that 04:39.990 --> 04:42.360 is losing this particular file. 04:42.750 --> 04:51.550 I've tried to run this fine and we've seen the change in my site but I to Zamperla Darby XTi and I hope 04:51.600 --> 04:56.060 this find you can see I got this particular line. 04:56.370 --> 04:59.350 So that's how it actually meant in plain code. 04:59.590 --> 05:08.680 And if I open it in sideways and change something even when I exampled RTX the head if I run this one 05:08.970 --> 05:10.520 you'll see it's genius. 05:10.720 --> 05:17.440 So this more that is or will it actually all the content that are available and fine find while googling 05:17.440 --> 05:21.060 this line and then rewrite everything. 05:21.070 --> 05:27.090 So if you have any need that has previously enabled it is going to delete everything. 05:27.100 --> 05:32.210 Also once we close this file that means I don't have any access to this file now. 05:32.300 --> 05:43.520 So if I tried to write after closing it is not Google U.S.A. or even a one line number six. 05:43.550 --> 05:45.160 Hey you can save about anywhere. 05:45.200 --> 05:49.320 That as an output operation on rules quite 05:53.990 --> 05:56.270 as if you are right function. 05:56.320 --> 06:03.400 That is to work on and we find we have to do that after opening and closing and had in fact tried to 06:03.400 --> 06:09.910 run this one that means I'm writing this two dimes in my example or the XTi after opening and before 06:09.940 --> 06:17.900 closing this one you see I got this redo for two days. 06:18.210 --> 06:23.090 That means one is over and then there's my point dreaming in at the end of the lane. 06:23.280 --> 06:27.480 I been there again and continue printing that doesn't continue. 06:27.520 --> 06:31.340 I can be maddening at 9 years old. 06:41.060 --> 06:49.070 Fun again Bucy last time I heard those are two lines so two things that you need to keep in mind. 06:50.080 --> 06:57.010 You do select more correctly with five you have to do everything between open and close and also keep 06:57.010 --> 06:58.410 an eye on our point. 06:58.900 --> 07:05.250 Also the reason for using this movement is actually three of our system is always used by our prime 07:05.320 --> 07:06.300 handler. 07:06.340 --> 07:13.170 So I'm one of them are using somebody XTi what you are dealing with in a binary find or what if we got 07:13.180 --> 07:19.690 any error and this file them in the green without seeming or we have just created a file and we haven't 07:19.690 --> 07:20.410 seen that. 07:20.440 --> 07:25.340 And it was not exactly do many reasons can happen with global warming. 07:25.510 --> 07:29.260 So it is a good conventional way to close out. 07:29.320 --> 07:36.150 So we do mistake of writing any content after that are excluding any other or not. 07:36.220 --> 07:43.250 And once we close that we don't have any access to this decide to get a new head in the next election. 07:43.240 --> 07:46.980 Let us talk about mood mod's see you in the next lecture. 07:47.140 --> 07:49.400 Maybe I want to believe in our finds.