Attr.addMacro Sync
var result = Attr.addMacro(repo, name, values);
Parameters |
Type |
|
repo |
Repository |
|
name |
String |
|
values |
String |
|
Attr.cacheFlush Sync
Attr.get Async
Attr.get(repo, flags, path, name).then(function(string) {
// Use string
});
Parameters |
Type |
|
repo |
Repository |
The repository containing the path. |
flags |
Number |
A combination of GIT_ATTR_CHECK… flags. |
path |
String |
The path to check for attributes. Relative paths are interpreted relative to the repo root. The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory). |
name |
String |
The name of the attribute to look up. |
| Returns | |
| — | — |
| String | Output of the value of the attribute. Use the GIT_ATTR_…
macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just
use the string value for attributes set to a value. You
should NOT modify or free this value. |
Attr.getMany Async
Attr.getMany(repo, flags, path, num_attr, names).then(function(array) {
// Use array
});
Parameters |
Type |
|
repo |
Repository |
The repository containing the path. |
flags |
Number |
A combination of GIT_ATTR_CHECK… flags. |
path |
String |
The path inside the repo to check attributes. This does not have to exist, but if it does not, then it will be treated as a plain file (i.e. not a directory). |
num_attr |
Number |
The number of attributes being looked up |
names |
String |
An array of num_attr strings containing attribute names. |
Attr.value Sync
var result = Attr.value(attr);
Parameters |
Type |
|
attr |
String |
The attribute |
Returns |
|
Number |
the value type for the attribute |
Attr.VALUE ENUM
Flag |
Value |
Attr.VALUE.UNSPECIFIED |
0 |
Attr.VALUE.TRUE |
1 |
Attr.VALUE.FALSE |
2 |
Attr.VALUE.STRING |
3 |