开发者

Best way to validate directory and file structure

开发者 https://www.devze.com 2023-03-28 00:09 出处:网络
I have an interface where user can upload zip file containing one or more zips and flat files. Example directory 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

精彩评论

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