It is one of the worst practices a programmer can do.
Many of your player if not most probably use windows.
When you store an entity under a sub directory depending on the name length of the entity if they made or your random name gen system creates it that is becomes part of that entities path. Windows depending on the version has different limits to what it can look at with a path length. It is entirely possible to create objects in the game you can not load all of the structure simply do to windows not being able to even seen it.
What is worse your system is incapable of deleting those objects even windows itself isn't capable of doing so through its on file manager. In fact the only way I found to delete such objects is to write a program or script that renames every directory to a single letter then goes through and deletes the deep directories.
Create a connection list and store it in a file. Just look at it as a virtual directory. It should be faster on top of being safer in storing the ships docked entities.
Many of your player if not most probably use windows.
When you store an entity under a sub directory depending on the name length of the entity if they made or your random name gen system creates it that is becomes part of that entities path. Windows depending on the version has different limits to what it can look at with a path length. It is entirely possible to create objects in the game you can not load all of the structure simply do to windows not being able to even seen it.
What is worse your system is incapable of deleting those objects even windows itself isn't capable of doing so through its on file manager. In fact the only way I found to delete such objects is to write a program or script that renames every directory to a single letter then goes through and deletes the deep directories.
Create a connection list and store it in a file. Just look at it as a virtual directory. It should be faster on top of being safer in storing the ships docked entities.