anthony.minessale at gmail.com
Fri Jun 23 20:00:36 UTC 2017
That wiki documentation is from the old spidermonkey js module not the new
I believe that putting a very large number will not cause any problems as
the data read cannot exceed the total bytes in the file so it should not be
You can always do an append loop. Its usually a good practice to have a
precise max size to read because what if the file was accidentally 2gb.
On Fri, Jun 23, 2017 at 3:36 AM, Raymond <xxxman2008 at 126.com> wrote:
> Hi ,
> This will help you . https://wiki.freeswitch.org/wiki/File
> At 2017-06-22 21:49:33, "Faruq Ahmad" <afarooqa at gmail.com> wrote:
> I have a FS dialplan that fetches callflow from a JSON file. File is read
> var JsonFd = new FileIO(JsonPath, 'r');
> result = JsonFd.data();
> var menu = JSON.parse(result),
> Is there anyway I can read the whole file in one attempt, i.e. when a
> smaller size was given to the .read() function it wouldn't read the
> complete file. I have increased the value of size for read function however
> my concern is in the long run file size might increase and parse would get
> an incomplete JSON.
> Is there anyway I can get filesize from FileIO object or detect EOF from
> the read buffer to make sure the whole file is loaded?
> Also if I increase the size for read fucntion buffer way over the
> estimated filesizes, is there any guarantee that no garbage values will be
> read from the disk after the EOF?
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> Official FreeSWITCH Sites
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞
☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
ClueCon Weekly Development Call
☎ sip:888 at conference.freeswitch.org ☎ +19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-users