Determine if the file or folder exists

xiaoxiao2021-03-06  82

Use system.io.file to check if there is a file that exists very simple:

BOOL EXIST = System.IO.File.exists (filename);

If you need to judge whether you exist (folder), you can use system.io.directory:

BOOL EXIST = System.io.directory.exists (FolderName);

转载请注明原文地址:https://www.9cbs.com/read-95000.html

New Post(0)