FF8Dir is a variable which stores root directory of Final Fantasy 8 game.
Depends on the OS, different strategy will be used to get that root directory. Now, there are two supported OSes: Windows and Linux.
Windows take on finding root directory
Algorithm first checks, if GameLocation is in array of hardcoded paths defined in HardcodedGameLocationProvider. If that is not the case, game checks into registers to find game location.
If game location wasn't found in also registers, game throws DirectoryNotFoundException.
Linux take on finding root directory
In case of Linux, game just check for hardcoded paths using HardcodedGameLocationProvider. If game location wasn't found throws DirectoryNotFoundException.
Metrics
To find a path to the game game uses following classes:
Understating how FF8Dir is created
Basic information
FF8Dir
is a variable which stores root directory of Final Fantasy 8 game.Depends on the OS, different strategy will be used to get that root directory. Now, there are two supported OSes: Windows and Linux.
Windows take on finding root directory
Algorithm first checks, if GameLocation is in array of hardcoded paths defined in
HardcodedGameLocationProvider
. If that is not the case, game checks into registers to find game location.If game location wasn't found in also registers, game throws
DirectoryNotFoundException
.Linux take on finding root directory
In case of Linux, game just check for hardcoded paths using
HardcodedGameLocationProvider
. If game location wasn't found throwsDirectoryNotFoundException
.Metrics
To find a path to the game game uses following classes:
In total of 199 lines of code.
I think I can make it simpler.