1
00:00:00,210 --> 00:00:05,820
So, guys, in this video, we are going to see the fighting put out, but that means you create the

2
00:00:05,820 --> 00:00:10,400
fighters and we will read the content from the fighters and we write the content to the fans.

3
00:00:11,040 --> 00:00:13,940
So first we will set fire to descriptor.

4
00:00:14,100 --> 00:00:18,750
So this will be like object to the fire.

5
00:00:18,750 --> 00:00:26,610
We specify and generally this is called fire descriptor and it holds some value for this opening the

6
00:00:26,610 --> 00:00:28,860
fire we need to set open of.

7
00:00:29,160 --> 00:00:30,690
So you need to open a file.

8
00:00:30,960 --> 00:00:35,330
And let's say the fire is this black nativity.

9
00:00:35,670 --> 00:00:37,590
And it's just for our congratulations.

10
00:00:39,240 --> 00:00:43,620
We are going to click on the properties and get the part.

11
00:00:48,060 --> 00:00:53,470
Let we copy the part now, I need to base this part.

12
00:00:55,000 --> 00:01:02,920
So we need to put the back was fresh so that there would be no special characters and to say in what

13
00:01:02,920 --> 00:01:04,720
more do you want to open the fight?

14
00:01:05,260 --> 00:01:11,750
If I say read more after it, then we can only read the contents of it so far.

15
00:01:11,840 --> 00:01:16,240
Now he only read more and that's the contents.

16
00:01:18,840 --> 00:01:20,270
And if did read.

17
00:01:23,630 --> 00:01:29,270
Now, the content contains the content, which contains the data of this file.

18
00:01:29,760 --> 00:01:33,020
So now we can just print the contents.

19
00:01:36,960 --> 00:01:44,550
And now I trust we will close the file using this file descriptor that Duclos, so first we have opened

20
00:01:44,550 --> 00:01:47,010
this story and put this.

21
00:01:50,850 --> 00:01:56,870
So we are opening this flooding in the remote and we are reading the contents using this read matter

22
00:01:56,880 --> 00:01:58,070
and we are printing this.

23
00:01:58,080 --> 00:02:00,030
And finally, we are closing the file descriptor.

24
00:02:00,240 --> 00:02:04,490
So it's a better way to cross fire descriptor.

25
00:02:07,540 --> 00:02:14,290
And if we run, this will get the contents of the text for which is that congratulations.

26
00:02:14,890 --> 00:02:17,670
So you can also speak for a number of bytes you want to read.

27
00:02:17,920 --> 00:02:26,510
If I see for a photo now or read the first four characters of the text, that is different.

28
00:02:27,340 --> 00:02:33,090
If you do not specify you are, the contents will be, uh, read from the file.

29
00:02:34,470 --> 00:02:36,430
Can see all the contents have been displayed.

30
00:02:37,600 --> 00:02:40,390
Now let's assume that there is no file.

31
00:02:42,260 --> 00:02:42,660
Sorry.

32
00:02:43,000 --> 00:02:45,150
No, we want to read the file.

33
00:02:45,160 --> 00:02:47,200
So to do that you need to write more.

34
00:02:48,130 --> 00:02:55,870
And after reading the contents and its contents is equal to.

35
00:02:57,800 --> 00:02:58,790
Success.

36
00:02:59,030 --> 00:03:05,520
So this is some string and we will write to the file if they're not right.

37
00:03:06,770 --> 00:03:09,440
So now let's go ahead and.

38
00:03:12,710 --> 00:03:18,650
Coffee, the same lines here, and pushed over so fast during the conference, and we are riding the

39
00:03:18,650 --> 00:03:19,420
success too.

40
00:03:19,610 --> 00:03:23,440
So let me run this program to see what contents.

41
00:03:28,360 --> 00:03:29,080
It's OK.

42
00:03:29,110 --> 00:03:32,560
It's being read, it is not permitted.

43
00:03:32,590 --> 00:03:35,220
What I want you to read WPX.

44
00:03:40,340 --> 00:03:43,160
All right, sorry, we need to specify what we want to write.

45
00:03:45,360 --> 00:03:46,940
I just want this for.

46
00:03:57,080 --> 00:03:57,920
We did not get any.

47
00:04:06,380 --> 00:04:17,620
So one way to find out is we need to bring to the Ifti that this will place the Casser, this unit at

48
00:04:17,630 --> 00:04:21,190
the location of Fort Carson in this picture.

49
00:04:21,410 --> 00:04:23,450
So this is the zero Kazar and.

50
00:04:27,730 --> 00:04:33,070
OK, first, in order to have the content right, we do not we do not have confidence.

51
00:04:34,960 --> 00:04:35,410
OK.

52
00:04:40,270 --> 00:04:46,890
So we have got the success in the picture, but I don't know why it's not showing enough of interpreter.

53
00:04:48,760 --> 00:04:55,630
So as you can see, the contents have been changed, but I don't know why it's not showing in this.

54
00:04:56,290 --> 00:04:59,220
So, OK, let's just move on.

55
00:05:01,450 --> 00:05:05,350
So we are reading and we are printing the contents of this file.

56
00:05:05,470 --> 00:05:06,520
It's a remote.

57
00:05:08,830 --> 00:05:11,050
And now let's bring the contents.

58
00:05:19,470 --> 00:05:27,720
So as you can see, the success we remember, so you can also there is this binary what if you are dealing

59
00:05:27,720 --> 00:05:33,130
with the binary or you want to be you are dealing with the binary data.

60
00:05:33,300 --> 00:05:34,470
So what do you want to write?

61
00:05:34,470 --> 00:05:36,090
Something hexadecimal for that matter.

62
00:05:36,570 --> 00:05:43,080
If their data is encoding, then you read binary more or you can say the binary more.

63
00:05:44,910 --> 00:05:49,470
So for now, that's w press to write more.

64
00:05:51,000 --> 00:05:59,880
So let me put this as remote and no, let's see, we have this success right now.

65
00:05:59,880 --> 00:06:01,910
Let's change that to some rented.

66
00:06:05,290 --> 00:06:09,580
It's a flat Biton, he's also.

67
00:06:13,010 --> 00:06:20,360
So in order to do this and run campaign, it says by flag flaggers, Python is awesome right now, I

68
00:06:20,360 --> 00:06:22,210
don't want to lose it.

69
00:06:22,220 --> 00:06:28,130
First, a file caster will be placed at the starting point.

70
00:06:28,130 --> 00:06:29,330
This is a gyro index.

71
00:06:29,630 --> 00:06:35,120
And whenever we have performed the real from this point on what the contents are, the file will be

72
00:06:35,120 --> 00:06:36,410
written in the right set.

73
00:06:36,800 --> 00:06:41,140
And now you can change this cursor to any of these indexes.

74
00:06:41,810 --> 00:06:42,500
Open press.

75
00:06:43,040 --> 00:06:51,680
So let's say next fight I think you'll want to do for index four onwards, then the contents from the

76
00:06:51,680 --> 00:06:52,860
open press will be read.

77
00:06:53,300 --> 00:06:59,150
So we are going to change the cursor from before the opposition to this fourth position.

78
00:06:59,720 --> 00:07:10,530
So to do that, we need to say you have three Dot Sitkoff and we need to see four rate four from zero.

79
00:07:11,030 --> 00:07:12,650
So there are two parameters.

80
00:07:12,650 --> 00:07:16,400
You want to see the offset from zero.

81
00:07:16,970 --> 00:07:23,330
So from zero this onwards, you can see four, uh, presses ahead.

82
00:07:24,050 --> 00:07:26,280
You will see this one is a fortress.

83
00:07:27,140 --> 00:07:28,840
So now let's try to read this one.

84
00:07:31,840 --> 00:07:38,230
And as you can see, we did not get the flag because the castle is in the fourth position, that is

85
00:07:38,380 --> 00:07:43,790
on the fifth element and from Fifth Element on what's the 3D printer.

86
00:07:44,200 --> 00:07:48,520
You can also print the castle.

87
00:07:51,860 --> 00:07:53,980
You have to doubt if, Peter.

88
00:08:02,240 --> 00:08:11,330
And now I'm going to copy this line and just pasted in here to see the difference between them, as

89
00:08:11,330 --> 00:08:17,560
you can see, the cursor is a the location and then it has to form and then the content from the photo

90
00:08:17,590 --> 00:08:18,920
index have been printed.

91
00:08:22,200 --> 00:08:31,520
So there are some general properties of this file, you can say of name, print 250 the name.

92
00:08:31,950 --> 00:08:37,710
So this is a variable that contains the name of the file we are operating with.

93
00:08:41,870 --> 00:08:45,680
As you can see, it got the full part from that cedar tree.

94
00:08:48,060 --> 00:08:55,050
And you can say, A, that is open, it returns to all of us whether the file is open or not.

95
00:08:57,640 --> 00:08:58,270
I think.

96
00:09:01,460 --> 00:09:02,780
OK, I think it's gross.

97
00:09:06,560 --> 00:09:12,270
Since we are not we did not close yet the footprint before this gross matter.

98
00:09:12,590 --> 00:09:15,530
It will show you first because the fight is not close.

99
00:09:17,300 --> 00:09:18,900
So that's what these fighting.

100
00:09:19,250 --> 00:09:20,780
But I hope you have understood this.

101
00:09:21,410 --> 00:09:23,420
This is very important.

102
00:09:23,420 --> 00:09:30,560
And we be seeing in this, uh, expert our videos of before we write our expert in Boston that we will

103
00:09:30,560 --> 00:09:31,430
create a file.

104
00:09:31,760 --> 00:09:32,930
But in binary, what?

105
00:09:33,200 --> 00:09:35,930
So shall I told you the normal.

106
00:09:36,560 --> 00:09:40,360
And there is also happened more and more.

107
00:09:40,640 --> 00:09:45,810
The difference is the concern will be placed at the end of the file.

108
00:09:46,190 --> 00:09:55,250
You can change the castle location to zero with the seek method, but we will just use the read and

109
00:09:55,250 --> 00:09:56,700
write for main purposes.

110
00:09:57,090 --> 00:09:59,040
So check the open method as well.

111
00:09:59,840 --> 00:10:05,850
It's just the castle at the end and if you want to write something, it will be appended at the end.

112
00:10:05,870 --> 00:10:07,910
That's the only difference between.

113
00:10:07,910 --> 00:10:10,730
Right and so that's what this do.

114
00:10:10,760 --> 00:10:11,780
I hope you have understood.

