xref: /aosp_15_r20/external/google-cloud-java/owl-bot-postprocessor/synthtool/pydoc.html (revision 55e87721aa1bc457b326496a7ca40f3ea1a63287)
1*55e87721SMatt Gilbride<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2*55e87721SMatt Gilbride<html><head><title>Python: module __init__</title>
3*55e87721SMatt Gilbride<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4*55e87721SMatt Gilbride</head><body bgcolor="#f0f0f8">
5*55e87721SMatt Gilbride
6*55e87721SMatt Gilbride<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
7*55e87721SMatt Gilbride<tr bgcolor="#7799ee">
8*55e87721SMatt Gilbride<td valign=bottom>&nbsp;<br>
9*55e87721SMatt Gilbride<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>__init__</strong></big></big></font></td
10*55e87721SMatt Gilbride><td align=right valign=bottom
11*55e87721SMatt Gilbride><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Crennie%5Cgitrepos%5Csynthtool%5Csynthtool%5C__init__.py">c:\users\rennie\gitrepos\synthtool\synthtool\__init__.py</a></font></td></tr></table>
12*55e87721SMatt Gilbride    <p><tt>Synthtool&nbsp;synthesizes&nbsp;libraries&nbsp;from&nbsp;disparate&nbsp;sources.</tt></p>
13*55e87721SMatt Gilbride<p>
14*55e87721SMatt Gilbride<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
15*55e87721SMatt Gilbride<tr bgcolor="#aa55cc">
16*55e87721SMatt Gilbride<td colspan=3 valign=bottom>&nbsp;<br>
17*55e87721SMatt Gilbride<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
18*55e87721SMatt Gilbride
19*55e87721SMatt Gilbride<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
20*55e87721SMatt Gilbride<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="__main__.html">__main__</a><br>
21*55e87721SMatt Gilbride</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
22*55e87721SMatt Gilbride</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
23*55e87721SMatt Gilbride<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
24*55e87721SMatt Gilbride<tr bgcolor="#eeaa77">
25*55e87721SMatt Gilbride<td colspan=3 valign=bottom>&nbsp;<br>
26*55e87721SMatt Gilbride<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
27*55e87721SMatt Gilbride
28*55e87721SMatt Gilbride<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
29*55e87721SMatt Gilbride<td width="100%"><dl><dt><a name="-copy"><strong>copy</strong></a> = move(sources: Iterable[Union[str, pathlib.Path]], destination: Union[str, pathlib.Path] = None, excludes: Iterable[Union[str, pathlib.Path]] = None, merge: Callable[[str, str, pathlib.Path], str] = None, required: bool = False) -&gt; bool</dt><dd><tt>copy&nbsp;file(s)&nbsp;at&nbsp;source&nbsp;to&nbsp;current&nbsp;directory,&nbsp;preserving&nbsp;file&nbsp;mode.<br>
30*55e87721SMatt Gilbride&nbsp;<br>
31*55e87721SMatt GilbrideArgs:<br>
32*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;sources&nbsp;(ListOfPathsOrStrs):&nbsp;Glob&nbsp;pattern(s)&nbsp;to&nbsp;copy<br>
33*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;destination&nbsp;(PathOrStr):&nbsp;Destination&nbsp;folder&nbsp;for&nbsp;copied&nbsp;files<br>
34*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;excludes&nbsp;(ListOfPathsOrStrs):&nbsp;Glob&nbsp;pattern(s)&nbsp;of&nbsp;files&nbsp;to&nbsp;skip<br>
35*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;merge&nbsp;(Callable[[str,&nbsp;str,&nbsp;Path],&nbsp;str]):&nbsp;Callback&nbsp;function&nbsp;for&nbsp;merging&nbsp;files<br>
36*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;there&nbsp;is&nbsp;an&nbsp;existing&nbsp;file.<br>
37*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;required&nbsp;(bool):&nbsp;If&nbsp;required&nbsp;and&nbsp;no&nbsp;source&nbsp;files&nbsp;are&nbsp;copied,&nbsp;throws&nbsp;a&nbsp;MissingSourceError<br>
38*55e87721SMatt Gilbride&nbsp;<br>
39*55e87721SMatt GilbrideReturns:<br>
40*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;True&nbsp;if&nbsp;any&nbsp;files&nbsp;were&nbsp;copied,&nbsp;False&nbsp;otherwise.</tt></dd></dl>
41*55e87721SMatt Gilbride <dl><dt><a name="-dont_overwrite"><strong>dont_overwrite</strong></a>(patterns: Iterable[Union[str, pathlib.Path]]) -&gt; Callable[[str, str, pathlib.Path], str]</dt><dd><tt>Returns&nbsp;a&nbsp;merge&nbsp;function&nbsp;that&nbsp;doesn't&nbsp;overwrite&nbsp;the&nbsp;specified&nbsp;files.<br>
42*55e87721SMatt Gilbride&nbsp;<br>
43*55e87721SMatt GilbridePass&nbsp;the&nbsp;return&nbsp;value&nbsp;to&nbsp;<a href="#-move">move</a>()&nbsp;or&nbsp;<a href="#-copy">copy</a>()&nbsp;to&nbsp;avoid&nbsp;overwriting&nbsp;existing<br>
44*55e87721SMatt Gilbridefiles.</tt></dd></dl>
45*55e87721SMatt Gilbride <dl><dt><a name="-move"><strong>move</strong></a>(sources: Iterable[Union[str, pathlib.Path]], destination: Union[str, pathlib.Path] = None, excludes: Iterable[Union[str, pathlib.Path]] = None, merge: Callable[[str, str, pathlib.Path], str] = None, required: bool = False) -&gt; bool</dt><dd><tt>copy&nbsp;file(s)&nbsp;at&nbsp;source&nbsp;to&nbsp;current&nbsp;directory,&nbsp;preserving&nbsp;file&nbsp;mode.<br>
46*55e87721SMatt Gilbride&nbsp;<br>
47*55e87721SMatt GilbrideArgs:<br>
48*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;sources&nbsp;(ListOfPathsOrStrs):&nbsp;Glob&nbsp;pattern(s)&nbsp;to&nbsp;copy<br>
49*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;destination&nbsp;(PathOrStr):&nbsp;Destination&nbsp;folder&nbsp;for&nbsp;copied&nbsp;files<br>
50*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;excludes&nbsp;(ListOfPathsOrStrs):&nbsp;Glob&nbsp;pattern(s)&nbsp;of&nbsp;files&nbsp;to&nbsp;skip<br>
51*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;merge&nbsp;(Callable[[str,&nbsp;str,&nbsp;Path],&nbsp;str]):&nbsp;Callback&nbsp;function&nbsp;for&nbsp;merging&nbsp;files<br>
52*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;there&nbsp;is&nbsp;an&nbsp;existing&nbsp;file.<br>
53*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;required&nbsp;(bool):&nbsp;If&nbsp;required&nbsp;and&nbsp;no&nbsp;source&nbsp;files&nbsp;are&nbsp;copied,&nbsp;throws&nbsp;a&nbsp;MissingSourceError<br>
54*55e87721SMatt Gilbride&nbsp;<br>
55*55e87721SMatt GilbrideReturns:<br>
56*55e87721SMatt Gilbride&nbsp;&nbsp;&nbsp;&nbsp;True&nbsp;if&nbsp;any&nbsp;files&nbsp;were&nbsp;copied,&nbsp;False&nbsp;otherwise.</tt></dd></dl>
57*55e87721SMatt Gilbride <dl><dt><a name="-replace"><strong>replace</strong></a>(sources: Iterable[Union[str, pathlib.Path]], before: str, after: str, flags: int = &lt;RegexFlag.MULTILINE: 8&gt;) -&gt; int</dt><dd><tt>Replaces&nbsp;occurrences&nbsp;of&nbsp;before&nbsp;with&nbsp;after&nbsp;in&nbsp;all&nbsp;the&nbsp;given&nbsp;sources.<br>
58*55e87721SMatt Gilbride&nbsp;<br>
59*55e87721SMatt GilbrideReturns:<br>
60*55e87721SMatt Gilbride&nbsp;&nbsp;The&nbsp;number&nbsp;of&nbsp;times&nbsp;the&nbsp;text&nbsp;was&nbsp;found&nbsp;and&nbsp;replaced&nbsp;across&nbsp;all&nbsp;files.</tt></dd></dl>
61*55e87721SMatt Gilbride</td></tr></table><p>
62*55e87721SMatt Gilbride<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
63*55e87721SMatt Gilbride<tr bgcolor="#55aa55">
64*55e87721SMatt Gilbride<td colspan=3 valign=bottom>&nbsp;<br>
65*55e87721SMatt Gilbride<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
66*55e87721SMatt Gilbride
67*55e87721SMatt Gilbride<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
68*55e87721SMatt Gilbride<td width="100%"><strong>__all__</strong> = ['copy', 'move', 'replace', 'dont_overwrite']</td></tr></table>
69*55e87721SMatt Gilbride</body></html>