public static bool bgl_chmod( byte[] f, bool r, bool w, bool x ) { if (bigloo.os.OS_CLASS.Equals( getbytes( "unix" ) )) { pair args = new pair( f, nil._nil ); StringBuilder mode = new StringBuilder( "a" ); mode.Append( r ? "+r " : "-r " ); mode.Append( w ? "+w " : "-w " ); mode.Append( x ? "+x " : "-x " ); args= new pair( getbytes( mode.ToString() ), args ); process p = new process( null, false, true, null, bigloo.foreign.BUNSPEC, bigloo.foreign.BUNSPEC, getbytes( "chmod" ), args, null ); obj x_status= p.xstatus(); return ((x_status is bint) && (((bint)x_status).value == 0)); } return false; }
public static int system( byte[] cmd ) { process p= new process( null, false, true, null, bigloo.foreign.BUNSPEC, bigloo.foreign.BUNSPEC, cmd, null, null ); return ((p.xstatus() is bint) ? ((bint)p.xstatus()).value : -1); }
public static Object c_process_xstatus( process o ) { return o.xstatus(); }