@ -1577,6 +1577,40 @@ FilePathName(File file)
return VfdCache [ file ] . fileName ;
return VfdCache [ file ] . fileName ;
}
}
/*
* Return the raw file descriptor of an opened file .
*
* The returned file descriptor will be valid until the file is closed , but
* there are a lot of things that can make that happen . So the caller should
* be careful not to do much of anything else before it finishes using the
* returned file descriptor .
*/
int
FileGetRawDesc ( File file )
{
Assert ( FileIsValid ( file ) ) ;
return VfdCache [ file ] . fd ;
}
/*
* FileGetRawFlags - returns the file flags on open ( 2 )
*/
int
FileGetRawFlags ( File file )
{
Assert ( FileIsValid ( file ) ) ;
return VfdCache [ file ] . fileFlags ;
}
/*
* FileGetRawMode - returns the mode bitmask passed to open ( 2 )
*/
int
FileGetRawMode ( File file )
{
Assert ( FileIsValid ( file ) ) ;
return VfdCache [ file ] . fileMode ;
}
/*
/*
* Make room for another allocatedDescs [ ] array entry if needed and possible .
* Make room for another allocatedDescs [ ] array entry if needed and possible .