Analyze the mode flag

We've made sure that the pathname is valid, and we've resolved any symbolic links that we needed to. Now we need to figure out the mode flags.

There are a few combinations that we need to take care of:

This may involve creating or truncating the target, or returning error indications. We'll see this in the code walkthrough below.