instructional systems
Index:
[Session8]URI and server: SCP, FTP
1 Chapter1
2 Chapter2
3 Chapter3
4 Chapter4
Your Location: Home Page  >  [2] HTML and CSS (on condition)  >  [Session8]URI and server: SCP, FTP  >  Chapter4  >  4.1 URI and the Name of the File on the Server
Real World and Virtual World on the WWW Server
[The purpose of this section]
Understand the structure of the folders and files on the WWW Server using a virtual world which models the real world as an example.

(Note) The explanation given in the textbook for this section assumes the environment (server name is www.stud.kumamoto-u.ac.jp and the software used for upload is FFFTP) of "Introduction to Information Technology A/B". Although this environment is different from that of "Information Processing Fundamentals", the content of the explanation is exactly the same. Please replace the server name and software name in accordance with your actual environment when you read this text.

Correspondence between a Folder and a Virtual World

For the time being, we think about the property of the folder on the WWW Server in such way that we have it in a corresponding virtual world. Although you might think the way this discussion is going is a little too stretched or too unrealistic, please try to be patient to come along with the discussion to this virtual world.

You are using your PC now. Please imagine that you have entered the PC and think that you are creating and modifying various files while you are moving around inside the PC from folder to folder.

When you are inside the PC dealing with files, you come to a stage where you want to upload a file you have created to the WWW Server. Therefore you decided to send a robot called Kumataro (referred to as Kumataro hereafter) to the WWW Server instead of you and let him assist you with your uploading operations.

熊太郎

You have started up the FTP client software (FFFTP), established a connection to the WWW Server, and sent out Kumataro to the server. In this way, you can not only see how the inside of the server looks through Kumataro’s eye, but you can also move around in the server or create a new folder there by giving instructions to Kumataro. However, the only place you can take a look or do various file operations is the place (i.e., folder) where Kumataro happens to be. In addition, if you specify one of the files in your PC and giving an instruction to "transfer (upload)" it, you can deliver the file to the place where Kumataro is, by way of Instant Substance Transfer Function. However, the only place you can deliver the file is the place where Kumataro happens to be.

The folder (room) at which Kumataro arrived looked barren, having neither windows nor doors. There was not anything either on the ceiling or on the floor.

初期ホームディレクトリ
(Note) Perhaps you might remember that this "folder you initially enter after you established an FTP connection" is called the "home directory" of the WWW Server.

By the way, at this stage, let us try to recall what would have been the equivalent situation in the real world. When you established a connection to the WWW Server via FFFTP, you were brought to the display as shown below, weren't you?

初期ホームディレクトリ

When we look at the situation at the server side (on the right), the pane is empty and the display of the folder bar is "/".

For the purpose of contrast, let us display the image above beside the image of the room (folder) where Kumataro is; however, please note that only the server side of the FFFTP image is displayed here.

初期ホームディレクトリ 初期ホームディレクトリ

Next, we ask Kumataro to create a dedicated folder for Web page publishing (i.e. public_html). Please note that, not just in the special folder (room) called public_html, but generally, you are not allowed to create a folder (room) anywhere but under the folder (under the floor of the room). You are not allowed to create a folder the other side of the wall or above the ceiling.

Now, let us create a folder (room) called public_html under this folder (under the floor).

初期ホームディレクトリ 初期ホームディレクトリ

At this stage, please note that, with regard to the public_html folder (a room called public_html), although Kumataro knows that it exists (a "star" in the image) as well as the name of the folder (room), he cannot directly see the inside of the folder (room).(Although we have no problem seeing the inside of the public_html folder (room) because we are seeing the world shown above where Kumataro is sitting from outside world, the eyes of Kumataro, as he is in the top folder, cannot see the inside of the public_html which is located under that folder (under the floor). In the same manner, although you can see the folder called public_html in the FFFTP server pane, you have to move to the folder by double clicking on the public_html icon to see its content, don’t you?

At this stage, let us move to the folder (room) called public_html. Then the situation becomes as shown in the image below.

初期ホームディレクトリ 初期ホームディレクトリ

Having moved to the public_html folder (room), what is Kumataro seeing now? There is no file (substance) in this folder (room), because the folder (room) has just been created, is there? The only object he can see is the entrance ("Red star" in the image) to the upper floor above the ceiling.
The folder bar of the server side of the FFFTP has changed to "/public_html", but the server pane is still empty, as there is no file in this folder. As for the entrance to the folder (layer) above, although you cannot see anything in the pane, you can move to the folder (layer) above by clicking cd ../. the upward arrow icon.

At this stage also, you can either send one of the files located on your PC to this folder (room) where Kumataro happens to be via "Instant Substance Transfer Function (FTP function)", or create a new folder (room) under this folder (under the floor of the room)". Of course, you are not allowed to create a folder (room) at the other side of the wall nor one above the ceiling.

Now, as a test, let us try to transfer a file (substance) called ex1.html from your PC to this folder. In addition, let us try to create a folder called w05 under this folder (under the floor of the room). As a result of these operations, we have a situation as shown in the image below.

初期ホームディレクトリ 初期ホームディレクトリ

In this situation, in relation to this folder, Kumataro can recognize the following:

  1. There exists a file (substance) named ex1.html.
  2. There exists a folder (room) under this folder and the name of the folder is w05.
  3. There is a folder above this folder (The folder name is not known, though).

In fact, at this stage, apart from these mentioned above, Kumataro does not know anything; for example, he does not know whether there is a file (substance) in the w05 folder or whether there is any file or any folder other than public_html in the folder (room) above.

In other words, generally speaking, what you can notice when you enter a folder is limited to the following:

  1. The existence of files (substances) in the folder (room) as well as the name of each file
  2. The existence of folder(s) (room(s)) under the folder (under the floor) as well as the name of each folder
  3. The fact that, although the name of the folder (name of the room) is unknown, there is a folder above the folder (With the exception of the "top folder", folder(s) always exists above the folder in question.)

It Is Not Possible to Specify the Object by the File Name Only

Suppose you are in such situation now as the image below after creating folders on and transferring files to the WWW Server in the same manner as explained in the previous section. (The folder w04 and a few other files have been added.)

初期ホームディレクトリ

In this situation, suppose you gave such instructions to Kumataro as "Move ex1.html to another folder (room)" or "Delete (eat) ex1.html".

Then Kumataro is in trouble.

The reason for above is as follows:

It is possible for Kumataro to move or delete ex1.html (cake), as he can see it in front of him. However, Kumataro knows that there are other files with the same name, ex1.html, in other folders (rooms), because Kumataro has created folders and transferred files, etc. up to this point (because he remembers the history of operation). For this reason, he does not know what to do when instructed to "do this and that in relation to ex1.html". He is in trouble because he does not know "which ex1.html?"

We have similar situations in the real world we live in, don't we? For example, suppose a father who is taking a bath asks his son in a loud voice, "Can you turn on the air conditioner for me?" Then the son might wonder, "You mean the air conditioner in the living room I am in now or the one in the study?"

In other words, there are many things which you cannot specify by just specifying the "name of the substance". The name of files and folders located on your PC or the server are a typical example, because, as a matter of course it is not surprising to find two or more files or folders of the same name on one PC or server.

Therefore, if you want to uniquely specify something, you have to always specify it in such way as "the one located at that place". For example, you are supposed to specify it in such manner as "the air conditioner in the study" or "ex1.html in the w05 folder". By the way, actually even this is not enough. Please take a look at the following image. Do you know which file is the one being specified in the image below if the instruction is "t0.html in the test folder"?

2つのtest/t0.html

Since there are two "test folders" in the image above, even if you say "… in the test folder", I would say "which test folder?" As a consequence, we cannot tell whether the "t0.html" in question means "dumpling t0.html" or "soft ice cream t0.html".

Then how can we uniquely specify the thing? The answer to this question will be given in the next chapter.

Copyright (C) Kenichi Sugitani 2005, All Rights Reserved