Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
stat_compat.cpp File Reference

Implements stat compatibility shims for nxdk. More...

#include <cstring>
#include <sys/stat.h>
Include dependency graph for stat_compat.cpp:

Functions

int _fstat (int fd, struct stat *status)
 Windows-style alias for the fstat compatibility shim.
 
int _stat (const char *path, struct stat *status)
 Windows-style alias for the stat compatibility shim.
 
int fstat (int fd, struct stat *status)
 Stub fstat for nxdk builds that only need a successful zeroed response.
 
int stat (const char *path, struct stat *status)
 Stub stat for nxdk builds that do not expose a compatible host file system.
 

Detailed Description

Implements stat compatibility shims for nxdk.

Function Documentation

◆ _fstat()

int _fstat ( int fd,
struct stat * status )

Windows-style alias for the fstat compatibility shim.

Parameters
fdFile descriptor to inspect.
statusOptional output populated with a zeroed status record.
Returns
Result from fstat().

◆ _stat()

int _stat ( const char * path,
struct stat * status )

Windows-style alias for the stat compatibility shim.

Parameters
pathRequested path.
statusOptional output populated with a zeroed status record.
Returns
Result from stat().

◆ fstat()

int fstat ( int fd,
struct stat * status )

Stub fstat for nxdk builds that only need a successful zeroed response.

Parameters
fdFile descriptor to inspect.
statusOptional output populated with a zeroed status record.
Returns
Zero after clearing the status record when provided.

◆ stat()

int stat ( const char * path,
struct stat * status )

Stub stat for nxdk builds that do not expose a compatible host file system.

Parameters
pathRequested path.
statusOptional output populated with a zeroed status record.
Returns
Always -1 to indicate that the query is unsupported.