Class | Line # | Actions | |||
---|---|---|---|---|---|
Repositories | 8 | 14 | 5 |
1 | package io.sunshower.service.revision.model; | |
2 | ||
3 | import io.sunshower.io.Files; | |
4 | import io.sunshower.model.core.io.File; | |
5 | import java.io.IOException; | |
6 | ||
7 | /** Created by haswell on 5/30/17. */ | |
8 | public class Repositories { | |
9 | ||
10 | 0 | ![]() |
11 | ||
12 | 0 | final Local local = repository.getLocal(); |
13 | 0 | if (local == null) { |
14 | 0 | return false; |
15 | } | |
16 | 0 | File file = local.getFile(); |
17 | 0 | if (file == null) { |
18 | 0 | return false; |
19 | } | |
20 | 0 | String path = file.getPath(); |
21 | 0 | if (path == null) { |
22 | 0 | return false; |
23 | } | |
24 | ||
25 | 0 | final java.io.File physicalFile = new java.io.File(path); |
26 | 0 | try { |
27 | 0 | Files.delete(physicalFile); |
28 | 0 | return true; |
29 | } catch (IOException e) { | |
30 | 0 | return false; |
31 | } | |
32 | } | |
33 | } |