<div dir="ltr"><div>pathhelper get's dir size or dirsize+recursive ?<br><br></div>i can see implement by the du commandline.. if root access?<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><font color="#888888">Lenz McKAY Gerardo (PICCORO)</font><div><font color="#888888"><a href="http://qgqlochekone.blogspot.com" target="_blank">http://qgqlochekone.blogspot.com</a></font></div></div></div>
<br><div class="gmail_quote">2018-09-21 8:24 GMT-04:00 Sebastián Kulesz <span dir="ltr"><<a href="mailto:sebikul@gmail.com" target="_blank">sebikul@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Í already implemented that solution in a module here: <a href="https://github.com/sebikul/mundus/blob/master/.src/PathHelper.module" target="_blank">https://github.com/<wbr>sebikul/mundus/blob/master/.<wbr>src/PathHelper.module</a><div><br></div><div>You are free to use it if it suits your needs!</div><div><br></div><div>Regards<div><div class="h5"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 21, 2018, 09:21 Me <<a href="mailto:adamnt42@gmail.com" target="_blank">adamnt42@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 21 Sep 2018 11:52:30 +0200<br>
Rolf-Werner Eilert <<a href="mailto:rwe-sse@osnanet.de" target="_blank">rwe-sse@osnanet.de</a>> wrote:<br>
<br>
> Am 21.09.2018 um 11:26 schrieb Benoît Minisini:<br>
> > Le 21/09/2018 à 10:54, Hans Lehmann a écrit :<br>
> >> Hello,<br>
> >><br>
> >> how do I determine the size (ilDirSize As Long) of a directory using <br>
> >> Gambas?<br>
> >><br>
> >> With kind regards<br>
> >><br>
> >> Hans<br>
> >><br>
> >> ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
> >><br>
> > <br>
> > You can't, because on Unix there is no system call to get the size of a <br>
> > directory. And I never understood the reason why they didn't implement <br>
> > that.<br>
> > <br>
> > You have to browse the directory, and add the size of each file one by <br>
> > one. Very slow...<br>
> > <br>
> <br>
> The reason is, what do want to know: only the size of the directory <br>
> itself, or recursively all subdirectories too, and do you want files <br>
> from links being included or excluded, and if so, only softlinks or <br>
> hardlinks, and do you want a size in bytes or clusters...???<br>
> <br>
> A ready-made function by the filesystem would not do anything else than <br>
> a function you code for yourself in, say, C, and it could not be any <br>
> faster. And it would have to cope with all exceptions and special <br>
> wishes, so a decent one made for yourself would be almost faster anyway.<br>
> <br>
> As far as I heard, the most advanced file systems like Btrfs (though I <br>
> don't like it) offer such fancies. From Gambas this would mean to shell <br>
> out and call the commandline function for it. Whereas - when we speak of <br>
> Btrfs - the size left on the media is only a rough guess, so they <br>
> recommend to keep at least 20 % as a security buffer. You will know why <br>
> once you crossed the limit...<br>
> <br>
> But when you stay whithin one directory and leave out any linked files <br>
> and do not go recursive, then it can be rather fast. I know that from <br>
> midnight commander.<br>
> <br>
> Regards<br>
> Rolf<br>
> <br>
> ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
<br>
du<br>
<br>
Don't know. Is that still around? Back in the good old days of limited disk space that was the goto<br>
to find out who/where the disk hogs were. Lots of command line options and you have to parse<br>
the output, But it beats the hell out of writing recursive ...<br>
<br>
du -shu ..nope ... <br>
du -sh * ... nope<br>
man du ...nope<br>
info du ? ...no i dont have info any more.<br>
<br>
ah to hell with it... <a href="https://www.google.com/search?q=linux+du+command&ie=utf-8&oe=utf-8&client=firefox-b-ab" rel="noreferrer" target="_blank">https://www.google.com/search?<wbr>q=linux+du+command&ie=utf-8&<wbr>oe=utf-8&client=firefox-b-ab</a><br>
<br>
hth<br>
b<br>
-- <br>
Me <<a href="mailto:adamnt42@gmail.com" target="_blank">adamnt42@gmail.com</a>><br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div></div></div></div>
<br><br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
<br></blockquote></div><br></div>