MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / BrowserFilePathNotify

Method BrowserFilePathNotify

src/main/java/VCard/VCardEdit.java:151–170  ·  view source on GitHub ↗
(String pathSelected)

Source from the content-addressed store, hash-verified

149
150//#if (FILE_IO)
151 public void BrowserFilePathNotify(String pathSelected) {
152 if (st > 0) {
153 if (st == 1) {
154 try {
155 FileIO f = FileIO.createConnection(pathSelected);
156 vcard.photo = f.readFile();
157 vcard.setPhotoType();
158 setPhoto();
159 redraw();
160 } catch (Exception e) {
161 }
162 }
163 if (st == 2 & vcard.hasPhoto) {
164 //System.out.println(photoType+"->"+getFileType(photoType));
165 String filename = StringUtils.replaceBadChars(vcard.getNickDate());
166 FileIO file = FileIO.createConnection(pathSelected + filename + vcard.getFileType());
167 file.writeFile(vcard.getPhoto());
168 }
169 }
170 }
171//#endif
172
173 public void cameraImageNotify(byte[] capturedPhoto) {

Callers

nothing calls this directly

Calls 10

createConnectionMethod · 0.95
readFileMethod · 0.95
setPhotoMethod · 0.95
replaceBadCharsMethod · 0.95
writeFileMethod · 0.95
setPhotoTypeMethod · 0.80
getNickDateMethod · 0.80
getFileTypeMethod · 0.80
getPhotoMethod · 0.80
redrawMethod · 0.45

Tested by

no test coverage detected