module filehelper.file_info
¶
Short summary¶
module pyquickhelper.filehelper.file_info
Defines class FileInfo
Classes¶
class |
truncated documentation |
---|---|
Intermediate class: it represents the data it collects about a file to determine whether or not it was modified. |
Functions¶
function |
truncated documentation |
---|---|
Computes MD5 for a file. |
|
Converts a string into a datetime. |
|
Tells if the string s could be a filename. |
|
Tells if the string s could be a url. |
Methods¶
method |
truncated documentation |
---|---|
usual |
|
set date |
|
set md5 |
|
set mdate |
Documentation¶
Defines class FileInfo
- class pyquickhelper.filehelper.file_info.FileInfo(filename, size, date, mdate, checksum)[source]¶
Bases:
object
Intermediate class: it represents the data it collects about a file to determine whether or not it was modified.
- Parameters:
filename – filename
size – size
date – date (str or datetime)
mdate – modification date (str or datetime)
checksum – to check the file was modified
Dates will be converted into datetime.
- __init__(filename, size, date, mdate, checksum)[source]¶
- Parameters:
filename – filename
size – size
date – date (str or datetime)
mdate – modification date (str or datetime)
checksum – to check the file was modified
Dates will be converted into datetime.
- pyquickhelper.filehelper.file_info.checksum_md5(filename)[source]¶
Computes MD5 for a file.
- Parameters:
filename – filename
- Returns:
string
- pyquickhelper.filehelper.file_info.convert_st_date_to_datetime(t)[source]¶
Converts a string into a datetime.
- Parameters:
t – str
- Returns:
datetime
- pyquickhelper.filehelper.file_info.is_file_string(s)[source]¶
Tells if the string s could be a filename.
- Parameters:
s – string
- Returns:
boolean