cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MEinstaller
Level 7

FileAttributes issues

I'm having some issues using FileAttributes to set file permissions for some of my files. I would rather use this custom even to set the file permissions that's why I'm trying to implement this. Here is my code:
[HTML]try {
String instLoc = arg0.resolveString( "$P( absoluteInstallLocation )" );
FileService fileserv = ( FileService )arg0.getService( FileService.NAME );
FileAttributes fileperm;
fileserv.setFileAttributes( instLoc + "//bin//*", fileperm.setAttributes(755));
} catch (ServiceException e ) {
System.out.println( e );
e.printStackTrace( );
} [/HTML]

When I try to compile I get an error that "void" type is not allowed on the line where I have fileperm.setAttributes. I'm having a hard time getting past this error and I haven't been able to find much help in the help file. Hopefully someone on here has done this before.

Thanks
Labels (1)
0 Kudos
(1) Reply
MEinstaller
Level 7

After talking to tech support it seems that FileAttributes is a real pain to use. Instead I am just using a chmod in an Execute Process.
0 Kudos