SolFSStorage.SetFileAttributes method
Filter:
Pascal DLL C++ (DLL/Lib) C++ (VCL) C++ (.NET) C# VB.NETOverview
Sets file attributes.
Declaration
[Pascal]
procedure SetFileAttributes(const FileName: WideString;
Attributes: LongWord);
[DLL]
long _stdcall StorageSetFileAttributes(unsigned long Storage, const wchar_t* FileName,
unsigned long Attributes);
[C++ (DLL/Lib)]
void SetFileAttributes(const unsigned short * FileName,
unsigned long Attributes);
[C++ (VCL)]
void __fastcall SetFileAttributes(const WideString FileName,
unsigned long Attributes);
[C++ (.NET)]
void SetFileAttributes(
String *fileName,
long Attributes)
[C#]
void SetFileAttributes(
String fileName,
int attributes)
[VB.NET]
Sub SetFileAttributes(ByVal fileName As String,
ByVal attributes As Long)
Parameters
- FileName - the full file name in the storage
- Attributes - use this parameter to set Attributes mode.
Values of StorageAttributes
[Pascal] [DLL] [C++ (VCL)] [C++ (.NET)] [C#] [VB.NET] [ActiveX] [VB]
Value
Description
Can be set with SetFileAttributes
attrFile
1 (0x1)
Specifies that the entry is a file
no
attrDirectory
2 (0x2)
Specifies that the entry is a directory
no
attrCompressed
8 (0x8)
Specifies that the file is compressed
no
attrEncrypted
16 (0x10)
Specifies that the file is encrypted
no
attrSymLink
32 (0x20)
Specifies that the entry is a symbolic link
no
attrReadOnly
64 (0x40)
Specifies that the file is read-only. The attribute is not used by SolFS.
yes
attrArchive
128 (0x80)
Specifies that the file requires archiving. The attribute is not used by SolFS.
yes
attrHidden
256 (0x100)
Specifies that the file is hidden. The attribute is not used by SolFS.
yes
attrSystem
512 (0x200)
Specifies that the file is system. The attribute is not used by SolFS.
yes
attrTemporary
1024 (0x400)
Specifies that the file is temporary. The attribute is not used by SolFS.
yes
attrDeleteOnClose
2048 (0x800)
Specifies that the file should be deleted when the last handle to the file is closed. The attribute is currently not supported by SolFS.
yes
attrReserved0
0x1000
Reserved for future use
no
attrReserved1
0x2000
Reserved for future use
no
attrReserved2
0x4000
Reserved for future use
no
attrReserved3
0x8000
Reserved for future use
no
attrNoUserChange
attrFile | attrDirectory | attrDataTree | attrCompressed | attrEncrypted | attrSymLink | attrReserved0 | attrReserved1 | attrReserved2 | attrReserved3
Thse attributes can't be changed with SetFileAttributes
no
attrUserDefined
0xFFFF0000
A mask that specifies user-defined attributes
yes
attrAnyFile
0xFFFFFFFF
A mask that specifies entries with any attributes
[DLL] Return values
0 if the function succeeded or one of Error codes if the function failed.
Description
Use SetFileAttributes to set attributes of the file. The method can be used to set custom attributes. See attribute descriptions to find out which attributes can't be changed using this method and should be changed using other methods (like SetEncryption and SetCompression).
