Skip to content

Commit de44d14

Browse files
committed
docs: updated API reference
1 parent 8f67d41 commit de44d14

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

docs/api-reference/core/Directory.mdx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {HorizontalDivider} from '/snippets/HorizontalDivider.mdx';
1111
import {GithubLinkNote} from '/snippets/GithubLinkNote.mdx';
1212
import {Attribute} from '/snippets/Attribute.mdx';
1313

14-
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L32-L264" />
14+
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L32-L269" />
1515

1616

1717
## Attributes
@@ -28,6 +28,10 @@ import {Attribute} from '/snippets/Attribute.mdx';
2828
<HorizontalDivider light={true} />
2929
<Attribute type={ <><span>list[</span> <a href="/api-reference/typescript/TSExport" style={ {fontWeight: "inherit", fontSize: "inherit"} }>TSExport</a> <span>]</span></> } description="Get a recursive list of all exports in files container." />
3030

31+
### <span className="text-primary">file_names</span>
32+
<HorizontalDivider light={true} />
33+
<Attribute type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">list[str]</code> } description="Get a list of all file names in the directory." />
34+
3135
### <span className="text-primary">functions</span>
3236
<HorizontalDivider light={true} />
3337
<Attribute type={ <><span>list[</span> <a href="/api-reference/core/Function" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Function</a> <span>]</span></> } description="Get a recursive list of all functions in files container." />
@@ -97,7 +101,7 @@ Get an export by name in files container (supports only typescript).
97101

98102
### <span className="text-primary">get_file</span>
99103
Get a file by its name relative to the directory.
100-
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L219-L233" />
104+
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L224-L238" />
101105

102106

103107
<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">TFile | None</code> } description=""/>
@@ -137,7 +141,7 @@ Get an import statement by name in files container.
137141

138142
### <span className="text-primary">get_subdirectory</span>
139143
Get a subdirectory by its name (relative to the directory).
140-
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L235-L237" />
144+
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L240-L242" />
141145

142146

143147
<Return return_type={ <><a href="/api-reference/core/Directory" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Directory</a> <span>| None</span></> } description=""/>
@@ -161,15 +165,15 @@ Get a list of all files and subdirectories in the directory.
161165

162166
### <span className="text-primary">remove</span>
163167
Remove all the files in the files container.
164-
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L247-L250" />
168+
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L252-L255" />
165169

166170

167171
<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>
168172

169173

170174
### <span className="text-primary">rename</span>
171175
Rename the directory.
172-
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L252-L256" />
176+
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L257-L261" />
173177

174178

175179
<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>
@@ -185,7 +189,7 @@ Get a list of all top level subdirectories in the directory.
185189

186190
### <span className="text-primary">update_filepath</span>
187191
Update the filepath of the directory and its contained files.
188-
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L239-L245" />
192+
<GithubLinkNote link="https://github.com/codegen-sh/codegen/blob/develop/src/codegen/sdk/core/directory.py#L244-L250" />
189193

190194

191195
<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>

0 commit comments

Comments
 (0)