Skip to content

Add file truncate() #11402

Description

@CTho9305

We don't have .truncate() and extending FAT files can be slow (and blocking), so high-frequency loggers need to preallocate oversized files, then later truncate them. This currently requires copying upon completion (slow + requires extra free space). Basically the same request as this upstream one:
micropython#4775

That one has a PR on it already, which looks pretty much how I'd expect: micropython#11500

Can we just grab that PR (or evangelize for MP to accept it or specify what exactly needs to change to get it accepted)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions