在Compact Framework中删除只读 [英] Remove readonly in Compact Framework

查看:163
本文介绍了在Compact Framework中删除只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是去除Compact Framework的一个文件的只读属性,因为我们没有一个文件:: SetAttributes的首选方式?

What is the preferred way to remove the readonly attribute of a file in Compact Framework as we don't have a File::SetAttributes?

推荐答案

您可以使用OpenNetCF 智能设备框架,其中有一个实现了一个 SetAttributes 功能。

You could use the OpenNetCF Smart Device Framework, which has a FileHelper class that implements the SetAttributes function.

或者,如果你不想去的路线,你可以的PInvoke本地的 SetFileAttributes 方法。

Or if you don't want to go that route, you could PInvoke the native SetFileAttributes method.

这篇关于在Compact Framework中删除只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆