CARDSetAttributes

C Specification

#include <revolution/card.h>

#define CARD_ATTR_PUBLIC        0x04u  // Any program can read the file
#define CARD_ATTR_NO_COPY       0x08u  // IPL cannot copy the file
#define CARD_ATTR_NO_MOVE       0x10u  // IPL cannot move the file

s32 CARDSetAttributes( s32 chan, s32 fileNo, u8 attr );

Arguments

chan EXI channel number.
fileNo File entry number.
attr Attributes to set.

Return Values

One of the following codes:

CARD_RESULT_FATAL_ERROR
CARD_RESULT_NOCARD
CARD_RESULT_NOFILE
CARD_RESULT_NOPERM
CARD_RESULT_BUSY
CARD_RESULT_READY

Description

Synchronously sets file attributes using a file number.

Only the CARD_ATTR_PUBLIC bit is set to a memory card file created by CARDCreate/CARDCreateAsync. The CARD_ATTR_PUBLIC must not be turned off by a game program.

A game program can set CARD_ATTR_NO_COPY and/or CARD_ATTR_NO_MOVE bits if required. A game program must not modify any other bits.

This function may put the current thread to sleep. For precautions when calling similar functions, refer to Interrupts and Callback Functions.

Note: This function is provided for debugging purposes. Applications should not use this function.

See Also

Card Functions
CARDGetAttributes
CARDSetAttributesAsync

Revision History

2007/09/25 Added information on the sleep status of threads.
2006/03/01 Initial version.


CONFIDENTIAL