Difference between revisions of "83Plus:Software:usb8x/Asm Interface/MSD/DOS updateAttributes"

From WikiTI
Jump to: navigation, search
 
m
Line 4: Line 4:
 
'''Minimum usb8x version:''' 0.12
 
'''Minimum usb8x version:''' 0.12
  
Updates "last modified" date/time attributes and optionally others for a file or folder.
+
Updates "last modified" date/time attributes and optionally others for a file.
  
 
=== Inputs ===
 
=== Inputs ===

Revision as of 22:12, 18 September 2006

Synopsis

Name: DOS_updateAttributes

Minimum usb8x version: 0.12

Updates "last modified" date/time attributes and optionally others for a file.

Inputs

  • HL points to file handle of an opened file
  • B is flags byte
Bit 0 Set if bit 0 of C should be the new "archived" status
Bit 1 Set if bit 1 of C should be the new "read-only" status
Bit 2 Set if bit 2 of C should be the new "hidden" status
  • C holds the new attribute values
Bit 0 Set for "archived" status
Bit 1 Set for "read-only" status
Bit 2 Set for "hidden" status

Outputs

  • File attributes are changed
  • C set if problems

Destroys

  • AF, BC, DE, HL

Notes

This is somewhat like "closing" a file. It will update the "last modified" date/time attributes according to the 84+/SE clock and can also change the hidden/read-only/archived attributes. It is NOT necessary to use this function. Example code to update a file's "last modified" date/time attributes only:

ld hl,file_handle
ld b,0
U_CALL DOS_updateAttributes
...

See Also

  • [[../DOS_fileRead|DOS_fileRead]] - Read bytes from a file at current seek pointer
  • [[../DOS_fileSeek|DOS_fileWrite]] - Write bytes to a file at current seek pointer and grow if necessary