File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1+ ## File
2+
3+ ### Constructor
4+
5+ ``` python
6+ File(filePath)
7+ ```
8+
9+ | Parameter | Type | Default | Description |
10+ | --------- | ------ | ------- | ------------------------------------------------------------ |
11+ | filePath | string | | The absolute path or relative path of the file. If using a relative path, it must include ` . ` or ` / ` . |
12+
13+ ### Attributes
14+
15+ <table >
16+ <tr>
17+ <td><code>File.content</code></td>
18+ <td>Return the entire content of the file.</td>
19+ </tr>
20+ </table >
21+
22+ ### Operation
23+
24+ #### File.Rewrite(content)
25+
26+ Rewrite the entire content of the file.
27+
28+ #### File.Append(content)
29+
30+ Append content at the end of file content.
31+
32+ #### File.Delete()
33+
34+ Delete file.
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def content(self):
2020 self .__m_file .close ()
2121 return self .__m_content
2222
23- def ReWrite (self ,content ):
23+ def Rewrite (self ,content ):
2424 self .__m_file = open (self .__m_filePath , "w" )
2525 self .__m_file .write (content )
2626 self .__m_file .close ()
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " easierfile"
3- version = " 1.0.0 "
3+ version = " 1.0.1 "
44description = " A simple Python package that object-oriented encapsulates Python traditional built-in file operations."
55license = " MIT"
66authors = [
" leoweyr <[email protected] >" ]
You can’t perform that action at this time.
0 commit comments