mirror of
https://github.com/jorio/Pomme.git
synced 2024-12-28 13:30:49 +00:00
Implement GetFPos; SetFPos placeholder
This commit is contained in:
parent
3ee40824cc
commit
e8939dbc8a
@ -340,6 +340,23 @@ OSErr SetEOF(short refNum, long logEOF)
|
||||
return unimpErr;
|
||||
}
|
||||
|
||||
OSErr GetFPos(short refNum, long* filePos)
|
||||
{
|
||||
if (!IsRefNumLegal(refNum)) return rfNumErr;
|
||||
if (!IsStreamOpen(refNum)) return fnOpnErr;
|
||||
|
||||
auto& f = GetStream(refNum);
|
||||
*filePos = (long) f.tellg();
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
||||
OSErr SetFPos(short refNum, long filePos)
|
||||
{
|
||||
TODO();
|
||||
return unimpErr;
|
||||
}
|
||||
|
||||
FSSpec Pomme::Files::HostPathToFSSpec(const fs::path& fullPath)
|
||||
{
|
||||
return dynamic_cast<HostVolume*>(volumes[0].get())->ToFSSpec(fullPath);
|
||||
|
@ -62,6 +62,10 @@ OSErr GetEOF(short refNum, long* logEOF);
|
||||
|
||||
OSErr SetEOF(short refNum, long logEOF);
|
||||
|
||||
OSErr GetFPos(short refNum, long* filePos);
|
||||
|
||||
OSErr SetFPos(short refNum, long filePos);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Resource file management
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user