index must only have one layer
(Map<String, String> index)
| 106 | * index must only have one layer |
| 107 | */ |
| 108 | public static void checkoutIndex(Map<String, String> index) { |
| 109 | // clean current dir |
| 110 | emptyCurrentDir(); |
| 111 | |
| 112 | for (Map.Entry<String, String> pathObjectId : index.entrySet()) { |
| 113 | String path = pathObjectId.getKey(); |
| 114 | String objectId = pathObjectId.getValue(); |
| 115 | FileUtil.createParentDirs(path); |
| 116 | final byte[] objectBytes = ZitContext.getObject(objectId); |
| 117 | FileUtil.createFile(objectBytes, path); |
| 118 | } |
| 119 | |
| 120 | } |
| 121 | |
| 122 | |
| 123 | } |
no test coverage detected