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

# GetFileInfo

> IXtfFileIOClient::GetFileInfo Method

Retrieves information about the specified file on the development console.

## Syntax

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

### 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](https://docs.xbox.com/reference/tools/xtf/xtffileio/structures/xtffileinfo-xtffileio-xbox-microsoft-t.md) structure that receives the file information.

### Return value

Type: HRESULT

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

## 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](https://docs.xbox.com/reference/tools/xtf/xtffileio/structures/xtffileinfo-xtffileio-xbox-microsoft-t.md) 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)](https://docs.xbox.com/tools/tools-console/commandlinetools/xtf-transport-errors.md).

## Requirements

**Header:** xtffileio.h

**Library:** xtffileio.lib

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

## See also

[IXtfFileIOClient::GetFileAttributes](https://docs.xbox.com/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfileattributes-ixtffileioclient-xtffileio-xbox-microsoft-m.md)\
[IXtfFileIOClient::GetFileSize](https://docs.xbox.com/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfilesize-ixtffileioclient-xtffileio-xbox-microsoft-m.md)\
[IXtfFileIOClient Interface](https://docs.xbox.com/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/ixtffileioclient-xtffileio-xbox-microsoft-t.md)\
[XtfFileIO](https://docs.xbox.com/reference/tools/xtf/xtffileio/xtffileio-xbox-microsoft-n.md)


## Related topics

- [GetFileAttributes](https://docs.xbox.com/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfileattributes-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [GetFileSize](https://docs.xbox.com/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/getfilesize-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [XTFFILEINFO](https://docs.xbox.com/reference/tools/xtf/xtffileio/structures/xtffileinfo-xtffileio-xbox-microsoft-t.md)
- [IXtfFileIOClient Interface (Interface contents)](https://docs.xbox.com/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/ixtffileioclient-xtffileio-xbox-microsoft-t.md)
- [Supplemental info](https://docs.xbox.com/publishing/game-publishing/concepts/certification/certification-supplemental-info.md)
