Преглед на файлове

recursively create folders before creating file

shahen94 преди 8 години
родител
ревизия
9d4a1ad5fd
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1
    0
      android/src/main/java/fr/greweb/reactnativeviewshot/RNViewShotModule.java

+ 1
- 0
android/src/main/java/fr/greweb/reactnativeviewshot/RNViewShotModule.java Целия файл

78
             if ("file".equals(result)) {
78
             if ("file".equals(result)) {
79
                 if (options.hasKey("path")) {
79
                 if (options.hasKey("path")) {
80
                     file = new File(options.getString("path"));
80
                     file = new File(options.getString("path"));
81
+                    file.mkdirs();
81
                     file.createNewFile();
82
                     file.createNewFile();
82
                 }
83
                 }
83
                 else {
84
                 else {