Browse Source

adds docs on filesystems

master
apoc 6 months ago
parent
commit
2194fad676

+ 1
- 0
docs/Roadmap.md View File

@@ -16,6 +16,7 @@ Apr 2020 - Computing basics
Apr 2020 - CLI basics
May 2020 - Git basics
May 2020 - Introduction of ALGOL-like programming languages
??? 2020 - Filesystems
??? 2020 - PHP & the filesystem, reading out data from a flat file
??? 2020 - WWW, HTML, HTTP, CGI
??? 2020 - Uniform Resource Locator(URI), handling navigation and resources

+ 119
- 0
docs/Series/3. filesystem/3.2 Paths View File

@@ -0,0 +1,119 @@
Now, the filesystem maps a filename to an address and a block range in order to know where things are.

Take the path from document 3.1,

```
/home/apoc/bazaar-design/docs/Series/3.\ filesystem/3.1 Usage.md
```

and delimited by a / (slash) it represents the *absolute* path to a resource, resource being the _final_ part of the path, in this case "3.1 Usage.md" - be it a file or a directory all the same.

This path approach to handling resources is pretty neat as it allows for both
- human-readable, comprehensible pathsnames
- efficient resource lookup

If you split the example pathname by the slash delimiter you get

```
home
apoc
bazaar-design
docs
Series
3.\ filesystem
3.1 Usage.md
```

and each part can be found *relative* to all the parts before it:

```
/ - can be found at the absolute root of the filesystem
/home/ - can be found within /
/home/apoc/ - can be found within /home/
/home/apoc/bazaar-design/ - can be found within /home/apoc/
/home/apoc/bazaar-design/docs/ - can be found within /home/apoc/bazaar-design/
/home/apoc/bazaar-design/docs/Series/ - can be found within /home/apoc/bazaar-design/docs/
/home/apoc/bazaar-design/docs/Series/3.\ filesystem/ - can be found within /home/apoc/bazaar-design/docs/Series/
/home/apoc/bazaar-design/docs/Series/3.\ filesystem/3.1 Usage.md - can be found within /home/apoc/bazaar-design/docs/Series/3.\ filesystem/
```

you get the picture.

--

Now for navigating these pathnames, in previous documents we talked about

```
dir
```

which shows you a list of filenames/dir(ectory)names at the path you are currently at. So if /home/ for example has only one directory called 'apoc', then what it'd list would be something like

```
Directory of /home

1/23/2020 1:23 PM <DIR> .
1/23/2020 1:23 PM <DIR> ..
1/23/2020 4:56 PM <DIR> apoc

```

What this lists are resources relative to the path from which 'dir' is ran at. As resources they can be appended to this /home path as final to result in

```
/home/.
/home/..
/home/apoc
```
--

Now /home/apoc/ is obviously a directory/folder (<DIR>) but what are these dotted list items and how are they directories?

- ./ points to a directory at the current path, (/home)
- ../ points to a directory at the path before the current one, (/)

This way the filesystem can be told to operate on path that is mapped to one-level-up (../), or to operate on a path at current level (./) - this is why you can, in some projects, frequently see things like

```
./configure
```
or
```
./setup.py
```
or
```
./setup.sh
```

So if you are reading this document under /home/apoc/bazaar-design/docs/Series/3.\ filesystem/, so this is the current path you are on, and you wanted - for example - to list any other series contained within /home/apoc/bazaar-design/docs/Series you could ```dir``` an *absolute* path like so

```
dir /home/apoc/bazaar-design/docs/Series
```

or with a *relative* path like so

```
dir ../
```

Both should return exactly the same results, because both point to exactly the same resource, an absolute path of

```
/home/apoc/bazaar-design/docs/Series
```

or one that is one-level-up (../) from

```
/home/apoc/bazaar-design/docs/Series/3.\ filesystem/
```

and gets resolved to

```
/home/apoc/bazaar-design/docs/Series/
```

That is how absolute and relative paths work.

+ 14
- 0
docs/Series/4. http, servers/4.1 Common server stacks.md View File

@@ -0,0 +1,14 @@
xampp (lamp, mamp, wamp), nginx. These are the HTTP/web service stacks most commonly used to handle most common web technology:

(l)inux (or (w)indows/(m)ac, or (x) any), (a)pache, (m)ysql, (p)hp.

Web servers all are, in essence, a program written so that it runs indefinitely, listening/checking if someone (or something) has connected to the machine it is running on.

Imagine a telephone. You sit by the telephone waiting, listening. I call your number, you hear the telephone ring, you pick up. I say "hello, say, what time is it in London?". You respond "it is 12 o'clock.".

You listened for a call, I made the call, once connected I requested information, you responded with information. In this scenario you are the server. Our voices speaking english, these are how information is transferred.

An HTTP server listens for HTTP requests and provides HTTP responses. HTTP stands for Hypertext transfer protocol and this protocol is how information is transferred.

Obtain XAMPP here:
https://www.apachefriends.org/download.html

+ 1
- 1
docs/issue-tracker.org View File

@@ -9,7 +9,7 @@
**** Solution

./Series/3. filesystem/3.1 Usage.md
./Series/3. filesystem/3.2 Paths.md

*** TODO HTML#1.2.3 from Definitions.md
**** Issue

Loading…
Cancel
Save