-
Notifications
You must be signed in to change notification settings - Fork 0
What is a File System
Devrath edited this page Jun 7, 2021
·
1 revision
-
FileSystem
is a way of storing data indocuments
instead ofkey-value
mapping mechanism. - Using this mechanism, we can
fetch
,add
,delete
, and move it to a different location. - We use it to store large size of data like
images
,audio
,video
and so on. - We can store the data here instead of
shared preferences
orlocal database
.
- We need to get access to the
root-file
orroot-directory
. - Once we have the access, we can add more children files within the accessed location.
- The file is created with a name using the stream
- Stream is a pipe that can
send data in one direction
, orreceive the data from the other direction
. - We have two types of streams an
input stream
and anoutput stream
.-
Input streams
---> Used for reading data from a file. -
Output streams
--> Used for writing data to a file.
-
- We get a reference to file or directory, Then Using that obtained reference create an
input stream
or theoutput stream
. Then using the particular stream we modify or read the data.