2012-04-14

[.NET][VB]読み取り専用の場合読み取り専用を解除する


If System.IO.File.GetAttributes(AssemblyInfoPath) And IO.FileAttributes.ReadOnly = IO.FileAttributes.ReadOnly Then
            Dim fas As IO.FileAttributes = IO.File.GetAttributes(AssemblyInfoPath)
            ' ファイル属性から読み取り専用を削除
            fas = fas And Not IO.FileAttributes.ReadOnly
            System.IO.File.SetAttributes(AssemblyInfoPath, fas)
        End If

0 件のコメント:

コメントを投稿