QGIS stores its persistent information in macOS files. The macOS file system is organized into folders and files. (A folder is just a special kind of file in which macOS stashes information about other files or folders.) Together, folders and files implement a simple hierarchical information management system, which lets you group bags of information (files) into nested categories (folders).
NOTE: Frew may occasionally refer to a folder as a directory (what they’re called on Planet UNIX, where he grew up.) Don’t freak out; the terms are identical.
CONTENTS
The combination of one or more folder names and a file name is called a pathname. macOS pathnames are written as follows:
/
/
/Users/frew/Desktop/ESM263/HW1
.
and an extension
/Users/frew/Desktop/ESM263/HW1/CountryWatch.htm
Any time you’re working on macOS, there’s a notion in effect called the current folder (AKA the working directory). For a macOS application, the current folder is usually the folder containing the document that it was started up with.
.qgs
or .qgz
extension), then QGIS’s current folder will be the folder containing the map document./Users/
yourname, where yourname is your macOS username.A pathname that doesn’t begin with the root folder is called a relative pathname. A relative pathname is assumed to have the pathname of the current folder prepended to it.
For example, if the current folder is /Users/frew/Desktop/ESM263
, then HW1/CountryWatch.htm
and /Users/frew/Desktop/ESM263/HW1/CountryWatch.htm
both refer to the same file.
The special folder name ..
(two periods) is often used in relative pathnames to refer to the parent folder of the current folder.
/Users/frew/Desktop/ESM263
, then ../arf.txt
and /Users/frew/Desktop/arf.txt
both refer to the same file.In the documentation for this course, we assume you have a folder on your computer named ESM263
, and that all of the folders and files you use for the course will live in this folder (or one of its subfolders). When we refer to a pathname beginning with ESM263/
, we’re referring to this folder.
/Users/
yourname
/Desktop/ESM263
When working with QGIS, it’s essential that you follow this simple rule when naming files or folders:
Use only letters, numbers, and _ (underscores) in file or folder names.
YOU’VE BEEN WARNED!
If you’d like even more detail on how filenames work (or don’t work), see:
Did I mention:
DON’T USE SPACES IN PATHNAMES!