Result = SetFileAttributes(Filename$, Attributes)
Set the attributes of the given Filename$.


Filename$ The name of the file to modify. This can also specify the name of a directory.
Attributes The new attributes.

On Windows, 'Attributes' is a combination of the following values:
  #PB_FileSystem_Hidden    : File is hidden
  #PB_FileSystem_Archive   : File has been changed and not archived since the last time
  #PB_FileSystem_Normal    : Normal attributes
  #PB_FileSystem_ReadOnly  : File is in read-only mode
  #PB_FileSystem_System    : File is a system file
On Linux and MacOSX, the following values can be used:
  #PB_FileSystem_ReadUser  : Access flags for the owning user
  #PB_FileSystem_ReadGroup : Access flags for the owning user's group
  #PB_FileSystem_ReadAll   : Access flags for all other users
To combine several attributes, just use the '|' (binary OR) operand:
  SetFileAttributes("C:\Text.txt", #PB_FileSystem_Hidden | #PB_FileSystem_ReadOnly)

Return value

Returns nonzero if the operation was successful and zero otherwise.

See Also


Supported OS


<- SetCurrentDirectory() - FileSystem Index - SetFileDate() ->