mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-31 19:40:38 +00:00
Extract SignalAccount from Manager
This commit is contained in:
parent
701328b8c2
commit
35c72f692f
30 changed files with 793 additions and 549 deletions
|
@ -33,13 +33,18 @@ public class IOUtils {
|
|||
return output.toString();
|
||||
}
|
||||
|
||||
public static void createPrivateDirectories(String path) throws IOException {
|
||||
final Path file = new File(path).toPath();
|
||||
public static void createPrivateDirectories(String directoryPath) throws IOException {
|
||||
final File file = new File(directoryPath);
|
||||
if (file.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
final Path path = file.toPath();
|
||||
try {
|
||||
Set<PosixFilePermission> perms = EnumSet.of(OWNER_READ, OWNER_WRITE, OWNER_EXECUTE);
|
||||
Files.createDirectories(file, PosixFilePermissions.asFileAttribute(perms));
|
||||
Files.createDirectories(path, PosixFilePermissions.asFileAttribute(perms));
|
||||
} catch (UnsupportedOperationException e) {
|
||||
Files.createDirectories(file);
|
||||
Files.createDirectories(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue