c# - How to read file attributes using Master File Table data -


in project want list out files under specific file path.do user permission issue using master file table access files.

using thread can able read files under specific file location

this 1 list file name , parent frn,is there way list file attributes also????

i want show these details also.

  1. created date
  2. modified data
  3. file size

usn_record contains these details. enter image description here

you'd better off using more high-level enumerate contents of path (as suggested @harryjohnston), if you're determined go down route you've chosen, then...

using filereferencenumber got usn call, can call openfilebyid (specifying 0 dwdesiredaccess parameter - no read, no write), , can subsequently call getfileinformationbyhandle details need.

you don't need read or write permissions on file call getfileinformationbyhandle. file attributes you're getting usn call and/or getfileinformationbyhandle call can cast .net system.io.fileattributes.


Comments

Popular posts from this blog

apache - setting document root in antoher partition on ubuntu -

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -