[asterisk-bugs] [Asterisk 0016461]: [patch] for reading and writing to text file
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed May 26 11:36:35 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16461
======================================================================
Reported By: skyman
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 16461
Category: Functions/NewFeature
Reproducibility: N/A
Severity: feature
Priority: normal
Status: feedback
Asterisk Version: 1.6.1.11
JIRA: SWP-1478
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-12-17 09:55 CST
Last Modified: 2010-05-26 11:36 CDT
======================================================================
Summary: [patch] for reading and writing to text file
Description:
this patch adds 7 functions in func_env :
FILE_FORMAT
FILE_COUNT_LINE
FILE_READ_LINE
FILE_WRITE
FILE_WRITE_LINE
FILE_APPEND
FILE_APPEND_LINE
======================================================================
----------------------------------------------------------------------
(0122501) tilghman (administrator) - 2010-05-26 11:36
https://issues.asterisk.org/view.php?id=16461#c122501
----------------------------------------------------------------------
Actually, I don't think we need to alter the meaning of the parameters for
write:
; Replace the first line of the file with "bar"
Set(FILE(/tmp/foo.txt,L1,L1)=bar)
; Replace the last line of the file with "bar"
Set(FILE(/tmp/foo.txt,L-1,L1)=bar)
; Append "bar" to the file
Set(FILE(/tmp/foo.txt,L0)=bar)
; Tricky: truncate the file and write "bar" to the file (simply, replace
lines 1-999999 with "bar")
Set9FILE(/tmp/foo.txt,L1,L999999)=bar)
Issue History
Date Modified Username Field Change
======================================================================
2010-05-26 11:36 tilghman Note Added: 0122501
======================================================================
More information about the asterisk-bugs
mailing list