231: Filesystem: Metadata Holds More Information.

Take Up Code - En podcast af Take Up Code: build your own computer games, apps, and robotics with podcasts and live classes

Kategorier:

Metadata provides information about your files. You might hear the prefix meta applied to other things. It really just adds a higher level to whatever it describes. So metadata is information about your data. It’s data that describes your data in the files. Metadata includes things such as when a file was created, when was it last changed, who is the author, etc. And depending on the type of file, there could be more. A picture or image file could have information about where and when the picture was taken, what camera was used, the dimensions, etc. Listen to the full episode for more information about where a filesystem might store these properties. This includes a description of a forking filesystem and alternate data streams. You can also read the full transcript below. Transcript You might hear the prefix meta applied to other things. It really just adds a higher level to whatever it describes. So metadata is information about your data. It’s data that describes your data in the files. If you refer to something like metaplanning, then this refers to something about how you plan. Maybe before creating an actual plan to do something, you need a higher level plan for how to create the real plan. In general, going meta just means to take something to a higher level or to go beyond. For example, metathinking is thinking about how our minds think. Back to filesystems, metadata includes things such as when a file was created, when was it last changed, who is the author, etc. And depending on the type of file, there could be more. A picture or image file could have information about where and when the picture was taken, what camera was used, the dimensions, etc. You can use this information to gain more insight into your files. And applications can use it to give you more ways to organize your files. So instead of just looking at a list of files and folders sorted by name, you can view them sorted by their original author name. The extra information is also called either properties or attributes. Sometimes you might also hear the term extended attributes. This metadata needs space somewhere. I mean, remembering if a file should be read-only needs at least a single bit to be set to either 0 or 1 and that bit needs to be saved somewhere. The same thing with the name of the author. But before we get into where this is stored, I want to clear up something about read-only. This sounds a lot like security. Should you be able to write to the file or just read. Well, it’s not really very secure. Sure the concept of allowing some people to write while others can only read is definitely important. But that’s not what this attribute controls. The read-only attribute doesn’t really protect anything. It’s more of a reminder to applications that a particular file should not be changed or deleted. Think of it like a sign placed on a door that says “No Entry” and compare that with an actual locked door. Anybody can ignore the sign and enter. But most people will behave and avoid going through the door. A lock is much more secure and will stop people from entering unless they either have the key, pick the lock, or break the door. So remember that almost any security system can be broken. My dad told me when I was young that locks were only there to keep honest people out. So from that sense, there’s no difference between a sign and a lock for a person with the skill and motive to break through. A sign is a really weak form of security lust like the read-only attribute. Okay, back to attributes and where they get stored. First, we have to consider that some attributes are so common to a filesystem that they can apply to all the files. These are the things most often called attributes. They tend to take up a fixed amount of space. Even the traditional Unix style security information could be implemented by a filesystem as attributes. The reason a fixed amount of space is important is then the at

Visit the podcast's native language site