• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Search Unused File and Clean

Allesn

Member
Joined
May 4, 2011
Messages
204
Solutions
1
Reaction score
24
Is there any way to check if certain script that is in the scripts folder is not being called / used by any XML? I got a datapack here and I'm doing some fixes, though, I wanted to do a cleanup first.
 
Solution
Well, you could make a script for it. Parse the XML file, load a list of registered files and compare them to the directory list. (that shows all files).

In PHP, you can use DirectoryIterator to view directories. Eliminate files detected by parsing the XML document to get a list of files that are not used.
Well, you could make a script for it. Parse the XML file, load a list of registered files and compare them to the directory list. (that shows all files).

In PHP, you can use DirectoryIterator to view directories. Eliminate files detected by parsing the XML document to get a list of files that are not used.
 
Solution

Similar threads

Replies
17
Views
2K
Back
Top