Tech Tip: directory.json file locations
PRODUCT: 4D | VERSION: 20 | PLATFORM: Mac & Win
Published On: December 11, 2024
When dealing with directory file managment in merged server projects, there are different directory.json files located in different folders that will be used differently depending on the situation. The three folder locations are below:
- 1. Project directory file is located in the settings folder next to the project folder
2. Data directory file is located in the settings file next to the data file in use
3. Application directory file is in the settings folder inside the server database folder of the merged server application
The project directory file is also used for when you want to use the same directory file for all data files, or when there is just a single data file. This is the default. To use a specific directory file per data file, the data directory file is used, and takes priority over the file in the user settings folder.
In a deployed environment, including the directory json in the build file will allow for safe changes of passwords and group memberships. The buildApp key automatically embeds the project directory file in the merged server during the build application process.
On the merged server, 4D server loads the data directory file if it exists, otherwise the application dierctory file is loaded. However, all modifications made to user, groups, and permissions are stored in the data directory file, regardless if the application directory file is loaded. The application directory file is never touched and could be considered an initialization directory file, ensuring that the application signature stays safe for macOS, or if the server application was placed in a read-only folder.