Skip to content

Commit e8d635d

Browse files
committed
New doc; Rebuild file:method<Rewrite> of class<File> renamed from method<ReWrite>.
1 parent 744cc76 commit e8d635d

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

doc/API reference.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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.

easierfile/file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "easierfile"
3-
version = "1.0.0"
3+
version = "1.0.1"
44
description = "A simple Python package that object-oriented encapsulates Python traditional built-in file operations."
55
license = "MIT"
66
authors = ["leoweyr <[email protected]>"]

0 commit comments

Comments
 (0)