mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
XEP-0373, XEP-0374: OpenPGP for XMPP: Instant Messaging
Fixes SMACK-826
This commit is contained in:
parent
f3262c9d58
commit
f0af00ee43
97 changed files with 8582 additions and 1 deletions
|
@ -158,6 +158,9 @@ public final class FileUtils {
|
|||
}
|
||||
|
||||
public static void deleteDirectory(File root) {
|
||||
if (!root.exists()) {
|
||||
return;
|
||||
}
|
||||
File[] currList;
|
||||
Stack<File> stack = new Stack<>();
|
||||
stack.push(root);
|
||||
|
@ -176,4 +179,25 @@ public final class FileUtils {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a {@link File} pointing to a temporary directory. On unix like systems this might be {@code /tmp}
|
||||
* for example.
|
||||
* If {@code suffix} is not null, the returned file points to {@code <temp>/suffix}.
|
||||
*
|
||||
* @param suffix optional path suffix
|
||||
* @return temp directory
|
||||
*/
|
||||
public static File getTempDir(String suffix) {
|
||||
String temp = System.getProperty("java.io.tmpdir");
|
||||
if (temp == null) {
|
||||
temp = "tmp";
|
||||
}
|
||||
|
||||
if (suffix == null) {
|
||||
return new File(temp);
|
||||
} else {
|
||||
return new File(temp, suffix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,5 +21,6 @@
|
|||
<className>org.jivesoftware.smack.java7.Java7SmackInitializer</className>
|
||||
<className>org.jivesoftware.smack.im.SmackImInitializer</className>
|
||||
<className>org.jivesoftware.smackx.omemo.OmemoInitializer</className>
|
||||
<className>org.jivesoftware.smackx.ox.util.OpenPgpInitializer</className>
|
||||
</optionalStartupClasses>
|
||||
</smack>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue