Get filenames from oxide/data subdirectories?Solved

I would like to create an array of filenames based on whatever files exist in a specific /oxide/data/subfolder/structure folder.

How would I go about doing this?

Thanks in advance :)

Fantastic Wulf, looks perfect. What is `path` relative to, the plugin? If I want to look at a folder in data, for instance `copypaste` what is that path?

I'll have a play about in a bit and see what I end up with :)

copypaste
Oh wow - easy peasy :D I guess the clue is in the name, DataFileSystem...

Merged post

Okay, so I added the following to my file:

		void Init() {

			string[] pastables = GetFiles("copypaste");

			foreach(string filename in pastables) { 
				Puts("Filename: " + filename);
			}

		}​

But it's saying the name GetFiles doesn't exist in the current context... :(

Can you point me towards a plugin that already uses this, I find it easier to work things out like that :D

It would be accessed the same way any data file would be, which is via the library.

Nice - got that working :)

Thanks Wulf.

Locked automatically