Not able to get this working. Using File.SetAttribute with 0x8000000 on Mono (OpenSuse). Execute permission does not get set. You sure 0x8000000 is the correct value? Thanks
Gonzalo Paniagua Javier-3 wrote: > > On Thu, 2010-09-23 at 03:36 -0700, kevink wrote: >> I create a .sh file and try to execute it with Process.Start() in my app. >> This is failing as the file is created without the "Execute" permission. >> Is >> there a way to specify this in C# on mono? > > Once you have created the file, you can set the "Execute" permission in > Mono with something like: > > File.SetAttributes (name, (FileAttributes)((int) File.GetAttributes > (name) | 0x8000000); > > The 0x8000000 attribute will only work with Mono and is internal. > > -Gonzalo > > > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > > -- View this message in context: http://mono.1490590.n4.nabble.com/Create-a-file-with-execute-permission-tp2551794p2714315.html Sent from the Mono - General mailing list archive at Nabble.com. _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
