You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: androidexternalfilewriter-kotlin/src/main/java/com/celites/androidexternalfilewriter_kotlin/KotlinExternalFileWriter.kt
+21-29Lines changed: 21 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ public class KotlinExternalFileWriter {
20
20
* Created by Prasham on 4/6/2016.
21
21
*/
22
22
publicfun Context.createAppDirectory() {
23
-
val directoryName =this.getString(this.getApplicationInfo().labelRes)
23
+
val directoryName =this.getString(this.applicationInfo.labelRes)
24
24
25
25
if (isExternalStorageAvailable(false)) {
26
26
@@ -47,21 +47,21 @@ public class KotlinExternalFileWriter {
47
47
val detailFile =File(parent, fileName)
48
48
if (!detailFile.exists()) detailFile.createNewFile()
49
49
else {
50
-
valmessege="File already there "
51
-
throwException(messege)
50
+
valmessage="File already there "
51
+
throwException(message)
52
52
}
53
53
return detailFile
54
54
} else {
55
55
throwException("$parent should be a directory")
56
56
}
57
57
} catch (e:IOException) {
58
58
e.printStackTrace()
59
-
valerrorMessege="IOException "+ e
60
-
throwException(errorMessege)
59
+
valerrorMessage="IOException $e"
60
+
throwException(errorMessage)
61
61
} catch (e:Exception) {
62
62
e.printStackTrace()
63
-
valerrorMessege="Exception "+ e
64
-
throwException(errorMessege)
63
+
valerrorMessage="Exception $e"
64
+
throwException(errorMessage)
65
65
}
66
66
67
67
}
@@ -86,16 +86,16 @@ public class KotlinExternalFileWriter {
Copy file name to clipboardExpand all lines: androidexternalfilewriter-kotlin/src/main/java/com/celites/androidexternalfilewriter_kotlin/KotlinStorageAccessFileWriter.kt
+19-23Lines changed: 19 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -49,8 +49,8 @@ class KotlinStorageAccessFileWriter(private val requestCode: Int) {
0 commit comments