@Override
	protected Set<OpenFlag> convertFlags(int flags) {
		EnumSet<OpenFlag> result = EnumSet.noneOf(OpenFlag.class);
		int rdwr = flags & O_MASK_RDWR;
		if (rdwr == O_RDONLY) {
			result.add(OpenFlag.O_RDONLY);
		}
		if (rdwr == O_WRONLY) {
			result.add(OpenFlag.O_WRONLY);
		}
		if (rdwr == O_RDWR) {
			result.add(OpenFlag.O_RDWR);
		}
		if ((flags & O_CREAT) != 0) {
			result.add(OpenFlag.O_CREAT);
		}
		if ((flags & O_TRUNC) != 0) {
			result.add(OpenFlag.O_TRUNC);
		}
		if ((flags & O_APPEND) != 0) {
			result.add(OpenFlag.O_APPEND);
		}
		return result;
	}
Construct a new library

@param machine the machine emulating the hardware
@param fs the file system to export to the user-space program
@param program a program containing the syscall definitions and conventions, likely the
           target program
@param user the "current user" to simulate
Ghidra/Features/SystemEmulation/src/main/java/ghidra/pcode/emu/linux/AbstractEmuLinuxSyscallUseropLibrary.java