Код: Выделить всё
var testDir = DocumentFile.FromTreeUri(global::Android.App.Application.Context, global::Android.Net.Uri.Parse("content://com.android.externalstorage.documents/tree/primary%3Adocuments/document/primary%3Adocuments%2FJob_0001"));
Logger.LogInfo($"TargetDir: {testDir.Uri}");
for(int attempt = 0; attempt < 3; attempt++)
{
foreach (var docFile in testDir.ListFiles())
{
Logger.LogInfo($"Attempt{attempt}. IsFile: {docFile.IsFile} - {docFile.Name} - {DateTimeOffset.FromUnixTimeMilliseconds(docFile.LastModified()).LocalDateTime:yyyy-MM-dd HH:mm:ss}");
}
Task.Delay(100).Wait();
}
< /code>
Результаты: < /p>
17:54:24 -- TargetDir: content://com.android.externalstorage.documents/tree/primary%3Adocuments/document/primary%3Adocuments%2FJob_0001
17:54:24 -- Attempt0. IsFile: True - Single-01.RAD - 2025-09-14 21:37:27
17:54:24 -- Attempt0. IsFile: False - Single-01.RA1 - 2025-09-14 21:37:27
Подробнее здесь: [url]https://stackoverflow.com/questions/79770631/android-net-application-intermittent-unpredictable-file-i-o[/url]
Мобильная версия