Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How to get file ID for GetFileSize( iFileID ) ?

Author
Message
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 1st Apr 2015 07:44 Edited at: 1st Apr 2015 07:49
I was trying to get a file size for a file, so I tried to call
GetFileSize()
But it produces an error that said it requires 1 parameter, which undoubtedly the iFileID.

But how do I obtain the iFIleID? By using OpenToRead()?
Do I even need it in the first place?

I did called GetFirstFile() before I called GetFileSize(). I assumed that by calling GetFirstFile() first, GetFileSize() will know which file I refers to (first file in a directory), but it seems that this is not the case.

So, how do I get the file size?
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 1st Apr 2015 08:40
Got it solved. Seems like I need to call OpenToRead() before GetFileSize().
The flow is as below:

GetFirstFile()
OpenToRead()
GetFileSize()
CloseFile()
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Apr 2015 10:05
Useful to know, thanks for sharing the solution!

Quidquid latine dictum sit, altum sonatur

Login to post a reply

Server time is: 2024-11-25 18:53:57
Your offset time is: 2024-11-25 18:53:57