io.py
Others:
Parameters: | path – Directory path. ( String ) |
---|---|
Returns: | Definition success. ( Boolean ) |
Bases: object
This class provides methods to read / write and append to files or retrieve online file content.
Usage:
>>> file = File(u"file.txt")
>>> file.content = [u"Some file content ...\n", u"... ready to be saved!\n"]
>>> file.write()
True
>>> file.read()
u'Some file content ...\n... ready to be saved!\n'
Parameters: |
|
---|
This method is the property for self.__path attribute.
Returns: | self.__path. ( String ) |
---|
This method is the property for self.__content attribute.
Returns: | self.__content. ( List ) |
---|
This method reads given file content and stores it in the content cache.
Parameters: |
|
---|---|
Returns: | Method success. ( Boolean ) |
This method writes content to defined file.
Parameters: |
|
---|---|
Returns: | Method success. ( Boolean ) |