MCPcopy Index your code
hub / github.com/ACL4SSR/ACL4SSR / write_file

Function write_file

scripts/gfwlist_parser.py:168–171  ·  view source on GitHub ↗
(filepath, content)

Source from the content-addressed store, hash-verified

166 return rules
167
168def write_file(filepath, content):
169 os.makedirs(os.path.dirname(filepath), exist_ok=True)
170 with open(filepath, 'w', encoding='utf-8') as f:
171 f.write(content)
172
173def format_ip_cidr_rules(ip_rules):
174 rules = []

Callers 5

split_yaml_fileFunction · 0.85
split_list_fileFunction · 0.85
generate_acl_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected