You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use yamlFile.getConfigurationFile().getName() to get the file name, or yamlFile.getFilePath() to get the absolute path.
getName is a method of ConfigurationSection (docs) that returns the name of the configuration section. YamlFile implements ConfigurationSection (is the file's root section), so yamlFile.getName() returns the same as yamlFile.getRoot().getName(), which is blank because root path is blank (yamlFile.getCurrentPath() is blank too, for the same reason).
For instance, yamlFile.getConfigurationSection("test").getName() will return test.
When ever I try to get a File name with file.getName(); it returns nothing.
The text was updated successfully, but these errors were encountered: