filesize(filename) just does that for you. Unless you're planning on asking a lot of questions about the same file, there's not really any point in doing the stat and then getting its properties.
On Thu, Apr 10, 2014 at 8:41 PM, Andrew Tulloch <[email protected]> wrote: > Not sure if it's the canonical method, but Julia has a wrapper for the > `stat` system call (http://en.wikipedia.org/wiki/Stat_(system_call)), so > you can just do > > ``` > stat(filename).size > ``` > > to get the file size in bytes. > > See https://gist.github.com/ajtulloch/10434524 for an example. > > > On Fri, Apr 11, 2014 at 1:06 AM, Jason Solack <[email protected]> wrote: > >> Hello all! >> >> I am wondering if there is a way to find the size a file in megabytes. >> I'm going to be outputting a lot of data and i'd like to monitor the size >> of my output file and create a new file once it hits a certain size. >> >> Thanks in advance >> >> Jason >> > >
