FSattrib Function

MDD File System Interface Library

MDDFS Interface Library Help
FSattrib Function
C
int FSattrib(
    FSFILE * file, 
    unsigned char attributes
);
Description

The FSattrib funciton will set the attributes of the specified file to the attributes passed in by the user. This function will load the file entry, replace the attributes with the ones specified, and write the attributes back. If the specified file is a directory, the directory attribute will be preserved.

Preconditions

File opened

Parameters
Parameters 
Description 
file 
Pointer to file structure 
attributes 
The attributes to set for the file
  • Attribute - Value - Indications
  • ATTR_READ_ONLY - 0x01 - The read-only attribute
  • ATTR_HIDDEN - 0x02 - The hidden attribute
  • ATTR_SYSTEM - 0x04 - The system attribute
  • ATTR_ARCHIVE - 0x20 - The archive attribute
 
Return Values
Return Values 
Description 
Attribute change was successful 
-1 
Attribute change was unsuccessful 
Side Effects

The FSerrno variable will be changed.

Remarks

None

Microchip MDD File System Interface 1.4.2 - [Oct 15, 2012]
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.