[c++] 디렉토리 속성 변경하기

다음은 디렉토리 속성을 변경하는 C++ 코드의 예시입니다:

#include <windows.h>

int main()
{
    // 디렉토리 경로
    LPCTSTR directoryPath = "C:\\example\\directory";

    // 새로운 속성 설정 (예: 읽기 전용)
    DWORD newAttributes = GetFileAttributes(directoryPath) | FILE_ATTRIBUTE_READONLY;

    // 속성 변경
    SetFileAttributes(directoryPath, newAttributes);

    return 0;
}

이 예시 코드에서는 SetFileAttributes 함수를 사용하여 C:\example\directory 디렉토리의 속성을 읽기 전용으로 설정하는 방법을 보여줍니다.

자세한 내용은 Windows API 및 C++ 관련 문서를 참고하시기 바랍니다.