MCPcopy Create free account
hub / github.com/annmuor/jnode / createOutboundFile

Method createOutboundFile

jnode-core/src/jnode/ftn/FtnTools.java:1060–1076  ·  view source on GitHub ↗
(Link link)

Source from the content-addressed store, hash-verified

1058 }
1059
1060 public static File createOutboundFile(Link link) {
1061 String template;
1062 if (link != null && link.getId() != null) {
1063 template = "out_" + link.getId() + ".%d";
1064 } else {
1065 template = "out_random.%d";
1066 }
1067 int i = 0;
1068 File f = new File(getInbound() + File.separator
1069 + String.format(template, i));
1070 while (f.exists()) {
1071 i++;
1072 f = new File(getInbound() + File.separator
1073 + String.format(template, i));
1074 }
1075 return f;
1076 }
1077
1078 private static File createInboundFile(boolean secure) {
1079 String template = ((secure) ? "s" : "u") + "inb%d.pkt";

Callers 4

createZipFileMethod · 0.95
packMethod · 0.95
packNetmailMethod · 0.80
packEchomailMethod · 0.80

Calls 4

getInboundMethod · 0.95
formatMethod · 0.80
existsMethod · 0.80
getIdMethod · 0.65

Tested by

no test coverage detected