简体   繁体   English

B4A-创建和引用目录?

[英]B4A - making and referring to a directory?

In B4A (or just Visual Basic), I've created a directory: 在B4A(或只是Visual Basic)中,我创建了一个目录:
Files.MakeDir(Files.DirInternal, "app_data)
However, when I try and read a file I get an error stating the directory/file doesn't exist: 但是,当我尝试读取文件时,出现错误,指出目录/文件不存在:
Files.ReadString(Files.DirInternal & "/app_data", "text.txt")

Is there a different way in which I should go into the directory to read the file? 我应该进入目录以读取文件吗?

Creating new directory if no such directory exist 如果不存在新目录,则创建新目录

pth = "d:\user_login"
        If Directory.Exists(pth) = False Then
            Directory.CreateDirectory(pth) 'create a folder in the path is no such folder is existing
End If

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM