> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IXtfFileIOClient::GetFileAttributes Method

> IXtfFileIOClient::GetFileAttributes Method

# IXtfFileIOClient::GetFileAttributes Method

Retrieves the attributes of the specified file on the development console.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
public:
HRESULT GetFileAttributes(
         LPCWSTR pszFileName,
         LPDWORD pdwFileAttributes
)  
```

<a id="parametersSection" />

### Parameters

*pszFileName*\
Type: LPCWSTR

\[in] A pointer to the filename of the file to get the attributes of.

*pdwFileAttributes*\
Type: LPDWORD

\[out] A pointer that receives the bitwise-OR combination of file attributes for the specified file. See [File Attribute Constants](https://msdn.microsoft.com/library/windows/desktop/gg258117\(v=vs.85\).aspx) for a list of possible attributes.

<a id="retvalSection" />

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an HRESULT error code.

<a id="remarksSection" />

## Remarks

This function gets the file attributes of a specified file on the development console. If an error occurs, this function returns an HRESULT error code. For more information about HRESULT error codes specific to XBOX Tools Framework (XTF) API, see [XTF transport errors (NDA topic)](/tools/tools-console/commandlinetools/xtf-transport-errors).

Use the [IXtfFileIOClient::SetFileAttributes](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/setfileattributes-ixtffileioclient-xtffileio-xbox-microsoft-m) method to set the file attributes of a specified file on the development console.

<a id="requirementsSection" />

## Requirements

**Header:** xtffileio.h

**Library:** xtffileio.lib

**Supported platforms:** Windows (for XBOX console tools)

<a id="seealsoSection" />

## See also

[IXtfFileIOClient::GetFileInfo](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfileinfo-ixtffileioclient-xtffileio-xbox-microsoft-m)\
[IXtfFileIOClient Interface](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/ixtffileioclient-xtffileio-xbox-microsoft-t)\
[XtfFileIO](/reference/tools/xtf/xtffileio/xtffileio-xbox-microsoft-n)


## Related topics

- [IXtfFileIOClient::SetFileAttributes Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/setfileattributes-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::GetFileInfo Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfileinfo-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::FindFiles Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/findfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::DeleteFiles Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/deletefiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::CopyFiles Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
