[Mono-list] how to do chmod in C# program?

Peter Wolf p_wol@hotmail.com
Mon, 19 Apr 2004 16:26:40 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0102_01C4262B.188009B0
Content-Type: text/plain;
	charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

Hi,

my program does this: =20

FileStream file =3D new FileStream(blah-blah-blah);
file.Write(byteData, 0, byteData.Length);

The resulting file is always created with mode 100600 (owner: read, =
write, others: nothing).

Is there any way to change the mode of this file to 100604 (to let =
others read the file) within my C# application?

Thanks so much for your help!

Peter
------=_NextPart_000_0102_01C4262B.188009B0
Content-Type: text/html;
	charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dkoi8-r">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>my program does this:&nbsp; =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>FileStream file =3D new=20
FileStream(blah-blah-blah);<BR>file.Write(byteData, 0,=20
byteData.Length);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The resulting file is always created =
with mode=20
100600 (owner: read, write, others: nothing).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there any way to change the mode of =
this file to=20
100604 (to let others read the file) within my C# =
application?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks so much for your =
help!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Peter</FONT></DIV></BODY></HTML>

------=_NextPart_000_0102_01C4262B.188009B0--