1 00:00:00,420 --> 00:00:05,520 In this video, we will rewrite the council, which will use a file system to ask you to come on. 2 00:00:06,750 --> 00:00:10,950 You know, this example, so you the one product is used as a council. 3 00:00:15,260 --> 00:00:21,800 As you see, this is a council which rolled into La S. We are way past Comice Askew camos. 4 00:00:23,310 --> 00:00:26,100 Come on, do we support it's got total memory. 5 00:00:27,270 --> 00:00:33,780 In this example, the council only received a comment on a finite commodity in the filesystem, if Zuckermann 6 00:00:33,780 --> 00:00:37,610 is Phonte, it will ask you to file, just as we did in the last video. 7 00:00:38,370 --> 00:00:41,100 So function get total memory is not used here. 8 00:00:44,970 --> 00:00:46,680 Our function passement. 9 00:00:48,490 --> 00:00:51,550 Also here, Camonte are discarded as well. 10 00:00:52,780 --> 00:00:54,130 It's our main function. 11 00:00:55,170 --> 00:01:01,230 After we started, Cholmondeley to buffer waybill circuits the same file name into image file on OpenEdge. 12 00:01:04,050 --> 00:01:06,240 So we called function open file. 13 00:01:07,650 --> 00:01:10,410 And the name of the file is stored in the buffer. 14 00:01:13,190 --> 00:01:14,510 We checked the recent audio. 15 00:01:17,400 --> 00:01:21,990 If they return what it is, minus one, it means that it so far is not font. 16 00:01:22,890 --> 00:01:23,940 So print. 17 00:01:26,090 --> 00:01:28,310 Command, not font. 18 00:01:31,760 --> 00:01:35,470 Otherwise, we know that the file which executes commands it font. 19 00:01:37,950 --> 00:01:39,040 So they could file. 20 00:01:42,180 --> 00:01:44,970 Next, we will forego process to ask you to come out. 21 00:01:47,740 --> 00:01:49,510 So we call function fork. 22 00:01:52,330 --> 00:01:58,030 If we return to the new process, which means the bid is zero. 23 00:01:58,900 --> 00:02:08,080 We call function as cute undeposited, the name of the file to it by cardiovascular functions and your 24 00:02:08,080 --> 00:02:10,360 process will run the file which just fought. 25 00:02:10,990 --> 00:02:13,210 When it is done, it will be as adult. 26 00:02:15,300 --> 00:02:22,080 You fit into the process, then the number is not zero, so we call wavefunction. 27 00:02:23,650 --> 00:02:31,810 To wait for the new process, as it so happens, the pity number of the legal process and wait for it 28 00:02:31,810 --> 00:02:32,470 to arrive at. 29 00:02:33,650 --> 00:02:38,300 When the new process, as it were, we will return from the weight function and continue to look. 30 00:02:39,540 --> 00:02:46,890 As you can see, here is an infinite look, each time we retrieve the data in the buffer will be a first 31 00:02:46,890 --> 00:02:51,580 career as a buffer so that the last command scene, a buffer, we will not affect the phone and data 32 00:02:51,600 --> 00:02:52,830 we will read into Buffer. 33 00:02:54,220 --> 00:03:01,060 So before we call function retirement command, we use function, ma'am, set to clear the buffer. 34 00:03:04,220 --> 00:03:07,060 Here, he says, the size of the buffer to one hundred of its. 35 00:03:09,490 --> 00:03:16,120 Another case we need to handle is that when we press backspace key to delete characters, so in the 36 00:03:16,120 --> 00:03:16,840 predicament. 37 00:03:17,970 --> 00:03:23,780 We made that comment about Forsys, we also need to clear the cardinal character in the buffer which 38 00:03:23,790 --> 00:03:25,260 mutilates to captor's. 39 00:03:26,330 --> 00:03:27,950 OK, that's it for the council. 40 00:03:29,990 --> 00:03:33,530 In this example, we still use that memory function to do the test. 41 00:03:36,200 --> 00:03:37,850 So we create a new folder. 42 00:03:40,050 --> 00:03:40,830 Toto mam. 43 00:03:42,950 --> 00:03:45,070 Helicopters are necessary fives into it. 44 00:03:49,240 --> 00:03:51,760 So we use the files in the use of one product. 45 00:03:56,270 --> 00:03:57,380 In the main function. 46 00:04:00,440 --> 00:04:01,650 The only thing we will to. 47 00:04:05,380 --> 00:04:07,120 It's got to total memory. 48 00:04:09,230 --> 00:04:16,070 So we call function got total memory, you and then we perent. 49 00:04:18,690 --> 00:04:22,770 Total memory is the number. 50 00:04:23,980 --> 00:04:26,290 And we printed you megabyte fomites. 51 00:04:34,000 --> 00:04:35,350 In the pilot script. 52 00:04:36,650 --> 00:04:38,270 We changed the article to file. 53 00:04:39,470 --> 00:04:42,260 From user, tapin to Taurama. 54 00:04:44,130 --> 00:04:50,220 Not that the system only supports filename with eight characters, so total is OK in this case. 55 00:04:51,600 --> 00:04:53,100 All right, let's build a products. 56 00:05:04,270 --> 00:05:06,100 Raymont Overstored MH. 57 00:05:23,980 --> 00:05:25,540 On the copies that are being. 58 00:05:34,890 --> 00:05:35,820 And total, Matt. 59 00:05:39,980 --> 00:05:44,650 Since we didn't change to Colonel Darby, we don't need to it here, OK? 60 00:05:47,760 --> 00:05:50,490 A monster partition under a box. 61 00:05:57,880 --> 00:06:04,120 Because we just simply placed a command file in the directorate of the image, we can, in fact type 62 00:06:04,120 --> 00:06:09,940 all the names of the files stored in the image and ask of them, which is not what we want to do. 63 00:06:10,390 --> 00:06:14,620 So here we just type in the name of the files that are not in the image. 64 00:06:16,380 --> 00:06:19,300 I know you can see message commander dot font is printed. 65 00:06:22,750 --> 00:06:25,750 So only commodify, what we call it in the image is total. 66 00:06:28,380 --> 00:06:30,720 So it's up to a man on a presenter. 67 00:06:32,110 --> 00:06:35,890 You can see the total, ma'am, is one thousand on 23 megabytes. 68 00:06:36,990 --> 00:06:43,200 Because in total malfunction, we don't point your line outside of the character's. 69 00:06:44,300 --> 00:06:50,330 So here the shall prompt and the total memory message is provided as the same line. 70 00:06:50,760 --> 00:06:52,220 OK, that's it for this video. 71 00:06:53,090 --> 00:06:54,230 See you in the next to.