CF - 检查输入并创建目录(设备或智能

发布于 2024-09-07 14:39:04 字数 132 浏览 2 评论 0原文

在我的 CF 应用程序中,我有一个文本框,用户在其中定义目录。

我想检查输入是否有效并创建目录。

该路径可以位于设备本身或存储卡上。

some1 可以帮我找到正确的解决方案吗?

谢谢!

In my CF application i have a textbox where user defines a directory.

I want to check if the input is valid and create the directory.

The path can be either on the device itself or on a storage card.

can some1 please help me with the correct solution?

thanx !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼前雾蒙蒙 2024-09-14 14:39:04

验证将取决于您。它有很多内容,包括抓取无效字符等。

创建目录非常简单。

System.IO.Directory.CreateDirectory("/MyDirectory");

Validating is going to be up to you. There is a lot to it, including scraping for invalid chanacters, etc.

Creating the directory is pretty simple.

System.IO.Directory.CreateDirectory("/MyDirectory");
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文