ホーム 暮らし 📁 [Part 4] What is a directory?

📁 [Part 4] What is a directory?

真鍋 千夏 真鍋 千夏 • 更新: • 公開: • 読了約 9 分
目次

~A story about the 'drawers' inside your computer~

Hello! Today's topic is "directory".
...It sounds a bit stiff at first, but it's actually very similar to the "tidying up" and "organizing" we do every day.

A directory is actually a folder

n358ab23af359

The term "folder" that often comes up when using a computer is actually also called a "
directory" in IT terminology.

In Windows, it's often called a "folder", but in the world of programming, it's often referred to as a "
directory".

Let's think about it in terms of drawers and bookshelves

For example, try to imagine a bookshelf in your home.
Don't you have drawers where you keep envelopes or notebooks?

  • Bookshelf → Large directory

  • Drawer → Inner directory (folder)

  • Envelopes or notebooks → Files

In this way, it becomes a "nested structure" where things are inside other things.
This is very similar to how directories work inside a computer.

4. The "address" of a directory = Path

This is where the concept of a "path" comes in.

Example: A file named "memo.txt" on the desktop

In the case of Windows:

C:\Users\あなたの名前\Desktop\memo.txt
  • C: is the "C drive (name of the storage area)"

  • \ is the separator (a backslash in Windows)

  • It means the file memo.txt is located in the Desktop folder, which is inside the "Your Name" folder.

For Mac:

/Users/あなたの名前/Desktop/memo.txt
  • Starting with / is a feature of Mac (the top-level hierarchy).

  • Mac uses a slash / as a separator.

  • This also means memo.txt located on the desktop of the "your name" user.

There are two types of paths

✅ Absolute path (full address set)

"Everything written out so it can be reached from anywhere"
-> C:\Users\...\memo.txt or /Users/.../memo.txt fall into this category.

✅ Relative path (directions from your current location)

"Only the path from the place you are currently looking at (current directory) is written"
-> ../Documents/memo.txt (memo.txt located in the Documents folder one level up)

In everyday life, it's like:

  • Absolute path: 1-2-3 XX, XX Ward, Tokyo

  • Relative path: It's on the 3rd floor of this building!
    something like that.

Why are directories important?

  • By organizing files, you avoid getting lost

  • When writing programs, "which file to use" is very important

  • In team development, placing files in designated locations with designated names is important

...as you can see, in the world of computers, properly grasping "where things are placed" is very important.

‍️ Summary: "Directory = A storage shelf inside your computer"

How was the discussion on "What is a directory?"?
It might feel a bit difficult at first, but

  • "something like a "shelf" for organizing things"

  • "A path is the 'address' that indicates that location"

  • "The notation is slightly different between Windows and Mac, but the content is similar"

It's okay to think of it with that image in mind◎

Next time: 'What does attach mean?'

~'Attaching' to emails or files means this~

'Please attach the file and send it.'
Have you ever seen or heard those words?
Next time, I will explain the meaning of the word 'attach' by comparing it to stationery and everyday actions✨

Finally...
↓↓❤️ Please click the heart to support me!!

同じカテゴリの記事

真鍋 千夏
デジタルマーケター 真鍋 千夏
プロフィールを見る →

美容と暮らしの話題を担当。メーカーの公式発表、商品成分の公表資料、専門家の監修記事をもとに事実を整理します。

おすすめの関連記事