Raised This Month: $51 Target: $400
 12% 

GetFileSize?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abckrieger
Senior Member
Join Date: Oct 2012
Location: Germany
Old 01-27-2014 , 11:35   GetFileSize?
Reply With Quote #1

hello,

i'm searching for a method that gives me the size of a file.. (in my case: map file).
I haven't found such a method so far.. thx4help
abckrieger is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 01-27-2014 , 11:47   Re: GetFileSize?
Reply With Quote #2

Have a look at this.
__________________
Impact123 is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 01-27-2014 , 11:49   Re: GetFileSize?
Reply With Quote #3

hit the keywords "file" and it will show you one. But i m not sure if it fix your need.
Haven't used it before either.
http://docs.sourcemod.net/api/index....d=show&id=256&

EDIT: Impact bet me 2minutes.. >.<"
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 01-27-2014 at 11:50.
GsiX is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-27-2014 , 12:00   Re: GetFileSize?
Reply With Quote #4

This will return it in bytes so if you want to get the KB of map it would be
Code:
//Bytes:
new filesize = FileSize("PathtoFile");
//KB:
new Float:kbFileSize = float(filesize)/1024.0;
//MB: you most likely want MB for maps.
new Float:mbFileSize = kbFileSize /1024.0;
Mitchell is offline
abckrieger
Senior Member
Join Date: Oct 2012
Location: Germany
Old 01-27-2014 , 14:16   Re: GetFileSize?
Reply With Quote #5

thx!
abckrieger is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode