calidion
10/17/2024, 10:44 AMAleksei Tirman [JB]
10/17/2024, 11:02 AMa.txt
file?Aleksei Tirman [JB]
10/17/2024, 11:06 AM<http://host>:port/d/a.txt
calidion
10/17/2024, 12:20 PMcalidion
10/17/2024, 12:22 PMcalidion
10/17/2024, 12:23 PMcalidion
10/17/2024, 2:30 PMcalidion
10/17/2024, 2:32 PMa.txt
, while other files not created by my program can't be accessed.Aleksei Tirman [JB]
10/17/2024, 3:08 PMcalidion
10/17/2024, 3:19 PMAleksei Tirman [JB]
10/17/2024, 3:34 PMcalidion
10/17/2024, 3:42 PMcalidion
10/17/2024, 3:43 PMAleksei Tirman [JB]
10/18/2024, 7:13 AMa.txt
isn't actually created in the Download
directory. Can you share the steps to reproduce the problem using your application?calidion
10/18/2024, 9:57 AMcalidion
10/18/2024, 9:58 AMAleksei Tirman [JB]
10/18/2024, 9:59 AMa.txt
file isn't created by your application when the Download
directory is empty.Aleksei Tirman [JB]
10/18/2024, 9:59 AMcalidion
10/18/2024, 10:03 AMif (file.exists()) {
to if (!file.exists()) {
to create the file in ip.kt
line 46
.Aleksei Tirman [JB]
10/18/2024, 10:04 AMAleksei Tirman [JB]
10/18/2024, 10:04 AMcalidion
10/18/2024, 10:07 AM!
can auto creating the a.txt
file and can see the file be read from the download directory. and other files can't be read.Aleksei Tirman [JB]
10/18/2024, 10:11 AMcalidion
10/18/2024, 10:11 AMAleksei Tirman [JB]
10/18/2024, 10:11 AMcalidion
10/18/2024, 10:13 AM/d.
calidion
10/18/2024, 10:14 AMHello from Ktor! a.txt
then you download directory files are not accessible to the program if the download directory contains more file than just a.txt
calidion
10/18/2024, 10:15 AM<http://192.168.0.104:10086>
button.Aleksei Tirman [JB]
10/18/2024, 10:23 AM/
route, you collect files contained in the Download
directory via the Android API. Then the files are serialized to a string and responded to the client. Can you tell me how is your problem related to Ktor?calidion
10/18/2024, 10:24 AMDownload
directory.Aleksei Tirman [JB]
10/18/2024, 10:24 AMcalidion
10/18/2024, 10:25 AMDownload
directory?calidion
10/18/2024, 10:26 AMAleksei Tirman [JB]
10/18/2024, 10:27 AMcalidion
10/18/2024, 10:28 AMcalidion
10/18/2024, 10:28 AMval directory: File = File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString())
val files = directory.listFiles()
calidion
10/18/2024, 10:29 AM