What I need: I need a method that, given a specific directory name on my app, will return his content.
/root
/folder1
/folder11
/folder12
/folder2
/folder21
/file21.txt
/folder3
/file31.txt
/file32.txt
For example, if I call myMethod("/root");
it will return to me a certain object list containing {'folder1', 'folder2', 'folder3'}
. Calling myMethod("/root/folder2");
will return {'folder21', 'file21.txt'}
Question: how can I implement this kind of function using Spring?
Aucun commentaire:
Enregistrer un commentaire