> ## 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::GetFileInfo Method

> IXtfFileIOClient::GetFileInfo Method

# IXtfFileIOClient::GetFileInfo Method

Retrieves information about the specified file on the development console.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
public:
HRESULT GetFileInfo(
         LPCWSTR pszFileName,
         LPXTFFILEINFO pFileInfo
)  
```

<a id="parametersSection" />

### Parameters

*pszFileName*\
Type: LPCWSTR

A pointer to the filename of the file to get the size of.

*pFileInfo*\
Type: LPXTFFILEINFO

A pointer to an [XTFFILEINFO](/reference/tools/xtf/xtffileio/structures/xtffileinfo-xtffileio-xbox-microsoft-t) structure that receives the file information.

<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 information, including the name, file attributes, creation time, last access time, last write time, and size, of a specified file on the development console as an [XTFFILEINFO](/reference/tools/xtf/xtffileio/structures/xtffileinfo-xtffileio-xbox-microsoft-t) structure. 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).

<a id="requirementsSection" />

## Requirements

**Header:** xtffileio.h

**Library:** xtffileio.lib

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

<a id="seealsoSection" />

## See also

[IXtfFileIOClient::GetFileAttributes](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfileattributes-ixtffileioclient-xtffileio-xbox-microsoft-m)\
[IXtfFileIOClient::GetFileSize](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfilesize-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::GetFileSize Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfilesize-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::GetFileAttributes Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfileattributes-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::SetFileAttributes Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/setfileattributes-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::FindFiles Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/findfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::CopyFiles Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
