Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility to create a file tree #15

Open
sporniket opened this issue Mar 17, 2015 · 1 comment
Open

Utility to create a file tree #15

sporniket opened this issue Mar 17, 2015 · 1 comment
Assignees

Comments

@sporniket
Copy link
Owner

In some cases I need to create a file tree with several folder and/or files.

the interface would be :

/**
 * Create a file tree.
 * @param root the root dir, MUST exist.
 * @param pathes list of pathes, relative to the root. ".." are forbidden ; the separator is "/" ; a path finishing with a "/" is a folder, otherwise it is an empty file ; a "," can be used to create a bunch of files/folders at the same location.
createFileTree(File root, String[] pathes)

Test suite :

  • "a/b" create the folder "a" containing the file "b"
  • "a/c/ create the folder "a" containing the folder "c"
  • "a/d,e/,f" create the folder "a" containing the files d and f and the folder "e"
  • "a/g,h/i" create the folder "a" containing the file "g" and the folder "h" that contains the file "i"
@sporniket sporniket self-assigned this Mar 17, 2015
@sporniket
Copy link
Owner Author

Test suite :

  • "a/g,h/i,j" create the folder "a" containing the file "g" and "j", and the folder "h" containing the file "i"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant