-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
moduos: Add os.utime() support to vfs layer and LFS2, FAT and posix filesystems. #9644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
efb6cd7
to
abc4d3c
Compare
abc4d3c
to
a141dc0
Compare
OK - all ports are compiling successfully now, including windows with gcc-mingw64. |
a141dc0
to
1e6b44b
Compare
Add utime() method to uos module via vfs layer: - Does not support "ns", "dir_fd" or "follow_symlinks" arguments from cpython. - utimes=None is not supported on qemu-arm due to lack of mp_hal_time_ns() support.
Uses utime() system call instead of utimes(). utime() has been obsoleted in posix.1-2008, but utimes() is not supported on windows (compiled with gcc-mingw-w64).
1e6b44b
to
4475fe4
Compare
Code size report:
|
This is an automated heads-up that we've just merged a Pull Request See #13763 A search suggests this PR might apply the STATIC macro to some C code. If it Although this is an automated message, feel free to @-reply to me directly if |
This PR adds support for
os.utime(filename, (atime, mtime))
.This is especially useful for preserving timestamps of files and directory stuctures copied onto (or sunchronised) between micropython boards and host systems or for managing file timestamps.
Support is provided for LittleFS2, FAT and posix filesystems.