Ohh ! My bad for overlooking at the mistakes. I used the window long back and forgot to change them in few places in my codebase, ill pass the plugin instance from now on.
About the .obsidian hardcoded folder path, I wasnt aware of such a setting in the Obisidian for changing the name of the config folder. Thank you for mentioning that. Same with the feature that / works on all platforms.
And for the fs and path libraries, I am using my custom hidden folders, hence used them. Will there be any problem if i use those libraries to read data from this hidden folder?
Now coming to the last issue of using the libraries instead of the prebuilt functions. The prebuilt function loadSettings, i am using this in my code, but it seems to be only running when Obsidian Starts, after that, if user makes any changes in my plugin’s SettingsTab and if i try to access the setting using plugin.settings.value, i only get the older values of setting which was loaded at the start of Obsidian. I have elaborated this in detail in my following question : Best Method to access the latest plugin setting values