Info |
---|
|
This routine is available starting with SIL Engineā¢ 1.0. Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | fileContains(path_to_file, regex [, charset]) | Package | file | Alias |
|
...
...
path_to_file, regex [, charset]) |
|
Description
Excerpt |
---|
|
Returns "true" if the file contains any string that matches the specified regex. |
Returns "true" if the file contains any string that matches the specified regex. If the regex contains a backslash replace it with two backslashes otherwise you will get a syntax error.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
path_to_file |
|
...
String | Yes | Specifies the file name. | regex |
|
...
String | Yes | Specifies search string into the file path_to_file. | charset |
|
...
String | No | The charset, optional. If you need to open a text file and the encoding is different, use a value that matches a valid charset name. Available starting |
|
...
Return
...
Type
boolean Boolean (true/false)
Example
Code Block |
---|
//This will match any "com.keplerrominfo.jira" occurence in myfile.txt.
fileContains("C:/myfile.txt","com\\.keplerrominfo.jira");
|
...
Note |
---|
It is recommended that you use absolute file paths with forward slashes ( / ). |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "file_routines"routine" and space = currentSpace ( ) |
---|
labels | filearray_routines |
---|
|