开发者

Best way to validate directory and file structure

I have an interface where user can upload zip file containing one or more zips and flat files.

Example directory structure -
Main.zip
 - one.zip
   - one
   - one/sample
     - one.xx.xxx.xml
     - one.xx.xxx.xml
   - one/html
   - one.xx.xxxx.xml
   - one.xx.xxxx.xml
 - two.zip
   - two
   - two/sample
     - two.xx.xxx.xml
     - two.xx.xxx.xml
   - two/html
   - two.xx.xxxx.xml
   - two.xx.xxxx.xml

I have a convention on how the files and directories should look like. What is the best way to validate them against the convention that I have.

  • other simpl开发者_如何学Ce rules are each zip and their contents follow the same structure except for the start of the file names.

Any ideas on how we can validate the directory structure and files?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜