module homeblog.copyfile
¶
Classes¶
class |
truncated documentation |
---|---|
This classes maintains a list of files and does some verifications in order to check if a file was modified or not … |
|
|
Static Methods¶
staticmethod |
truncated documentation |
---|---|
|
Methods¶
method |
truncated documentation |
---|---|
|
constructor |
|
|
Adds a file to self.modifiedList if it was modified. |
|
Processes a file copy. |
|
|
|
|
|
Returns True, reason if a file was modified or False, None if not. |
|
Saves the status of the copy. |
|
|
|
|
|
|
|
Updates the file in copyFiles (before saving), update all field. |
Documentation¶
Copy files
-
class
ensae_teaching_cs.homeblog.copyfile.
CopyFileForFtp
(file, logfunction=<function fLOG>, bloggiflatex='blog/giflatex/', giflatex='giflatex', giflatextemp='giflatex/temp', specificTrigger=False)¶ Bases :
object
This classes maintains a list of files and does some verifications in order to check if a file was modified or not (if yes, then it will be updated to the website).
-
__init__
(file, logfunction=<function fLOG>, bloggiflatex='blog/giflatex/', giflatex='giflatex', giflatextemp='giflatex/temp', specificTrigger=False)¶ Initialize self. See help(type(self)) for accurate signature.
-
add_if_modified
(file)¶ Adds a file to self.modifiedList if it was modified.
- Paramètres
file – filename
- Renvoie
True or False
-
copy_file
(file, to, doFTP=True, doClean=False, to_is_a_file=False)¶ Processes a file copy.
- Paramètres
file – file to copy
to – destination (folder)
doFTP – if True, does some latex modifications (creates an image)
doClean – if True, does some cleaning before the copy (for script in pyhome having section such as the one in tableformula.py)
to_is_a_file – it means to is a file, not a folder
-
copy_file_contains
(file, pattern, to, doFTP=True, doClean=False)¶
-
copy_file_ext
(file, exte, to, doFTP=True, doClean=False)¶
-
has_been_modified_and_reason
(file)¶ Returns True, reason if a file was modified or False, None if not.
- Paramètres
file – filename
- Renvoie
True,reason or False,None
-
save_dates
(checkfile=None)¶ Saves the status of the copy.
- Paramètres
checkfile – check the status for file checkfile
-
update_copied_file
(file)¶ Updates the file in copyFiles (before saving), update all field.
- Paramètres
file – filename
- Renvoie
file object
-