Feb 16 2018 01:06 AM
We try to work with the attributes of files in OneDrive for Business on Windows 10 (1709). This article ha a great overview:
https://www.petri.com/managing-onedrive-files-demand-windows-10-fall-creators-update
This is a link that documents the attributes flags:
https://msdn.microsoft.com/en-us/library/windows/desktop/gg258117(v=vs.85).aspx
I don't find an exact representation of the pinned and unpinned attribute:
C:\Users\marcoscheel\OneDrive - Glück & Kanja Consulting AG\Transfer> attrib /?
Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+X | -X] [+P | -P] [+U | -U]
[drive:][path][filename] [/S [/D]] [/L]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
O Offline attribute.
I Not content indexed file attribute.
X No scrub file attribute.
V Integrity attribute.
P Pinned attribute.
U Unpinned attribute.
B SMR Blob attribute.
[drive:][path][filename]
Specifies a file or files for attrib to process.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.
/L Work on the attributes of the Symbolic Link versus
the target of the Symbolic Link
We want to interact with the files in C and/or C#.
This is a sample directory with files and the three states:
This is a LS on a folder with different files
Dec 14 2019 11:41 AM
Dec 15 2019 11:26 AM
@rob_nicholson_helios no :(
Jun 17 2020 03:01 AM
somewhat related:
https://developercommunity.visualstudio.com/content/problem/174472/enum-fileattributes.html
from the linked resource:
[Flags]
enum FileAttributes : int
{
ReadOnly = System.IO.FileAttributes.ReadOnly,
Hidden = System.IO.FileAttributes.Hidden,
//System = System.IO.FileAttributes.System,
Directory = System.IO.FileAttributes.Directory,
Archive = System.IO.FileAttributes.Archive,
Device = System.IO.FileAttributes.Device,
Normal = System.IO.FileAttributes.Normal,
Temporary = System.IO.FileAttributes.Temporary,
SparseFile = System.IO.FileAttributes.SparseFile,
ReparsePoint = System.IO.FileAttributes.ReparsePoint,
Compressed = System.IO.FileAttributes.Compressed,
Offline = System.IO.FileAttributes.Offline,
NotContentIndexed = System.IO.FileAttributes.NotContentIndexed,
Encrypted = System.IO.FileAttributes.Encrypted,
IntegrityStream = System.IO.FileAttributes.IntegrityStream,
Virtual = 0x10000, // new
NoScrubData = System.IO.FileAttributes.NoScrubData,
RecallOnOpen = 0x40000, // new
RecallOnDataAccess = 0x400000 // new
}
+
Missing definitions:
Virtual = 0x10000
RecallOnOpen = 0x4_0000
Pinned = 0x8_0000
Unpinned = 0x10_0000
RecallOnDataAccess = 0x40_0000
SMR_BLOB = 0x????_????