Skip to content
  • Ross Lagerwall's avatar
    Implement truncate support for output streams · c3b6615e
    Ross Lagerwall authored
    Backends receive a TRUNCATE message which contains a size parameter.
    Truncation is signaled with a TRUNCATED message (which contains no other
    useful information).
    
    In more detail:
    Add a new dbus method, OpenForWriteFlags, which has a flags parameter to
    implement can_seek and can_truncate.  These flags are used in
    GDaemonFileOutputStream.  Compatability with old clients is maintained.
    Implement the can_truncate and truncate_fn GDaemonFileOutputStream
    methods.
    Add two new message types to the daemon socket protocol:
        G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_TRUNCATE
        G_VFS_DAEMON_SOCKET_PROTOCOL_REPLY_TRUNCATED
    Add a new job type, GVfsJobTruncate.
    Add two new methods to GVfsBackend which backend classes can implement:
    truncate and try_truncate
    
    https://bugzilla.gnome.org/show_bug.cgi?id=573837
    c3b6615e