Giter Club home page Giter Club logo

Comments (11)

billziss-gh avatar billziss-gh commented on June 5, 2024 1

@advancedwebdeveloper

@billziss-gh , could you tell whether your support of file systems (I see that you are dealing with few Golang packages, which has something to do with file systems) allow to improve QA part?

I am not sure I understand what you mean by "improve QA part".

To answer the original question: Windows does have Extended Attribute (EA) support. NTFS and I believe some versions of FAT support them. There is however a caveat: there is no Win32 API to access them and the NT API that exists is not documented.

The NT API consists of the functions NtQueryEaFile and NtSetEaFile and you can find information about them by searching online. I have example implementations of xattr functions using the NT API in the following places:

  • In my port of fsx to Windows, which I use to test file systems.
  • In a simple POSIX layer that is included with one of the WinFsp file systems: winposix.c. Please note that this EA code is not regularly tested.

I also note that Cygwin has a Linux-like implementation of xattr that uses the same NT API. You may want to have a look there as well.

One final note: you will find out that NTFS likes to uppercase extended attribute names (so that myxattr will become MYXATTR upon retrieval). Some POSIX layers deal with this by forcing all extended attribute names to be lowercase.

from xattr.

advancedwebdeveloper avatar advancedwebdeveloper commented on June 5, 2024

CC @asw101 @arschles @devigned

from xattr.

Tatskaari avatar Tatskaari commented on June 5, 2024

Might want to update this with a bit more information...

Seems NTFS has two ways to set attributes. Extended attributes can be added to the MFT (master file table) however they have limited size. This approach is also supported by FAT I believe. Alternative data streams is only supported by NTFS but allows unlimited data to be stored alongside the main file.

http://ntfs.com/ntfs_basics.htm

I doubt please would run into the size limitation of extended attributes, we only need to store 64 byte.

from xattr.

advancedwebdeveloper avatar advancedwebdeveloper commented on June 5, 2024

@AaLl86 , please explain about NTFS's capabilities/functionality
@craigbarkhouse , please share your vision
CC @brymat-msft

from xattr.

advancedwebdeveloper avatar advancedwebdeveloper commented on June 5, 2024

@billziss-gh , could you tell whether your support of file systems (I see that you are dealing with few Golang packages, which has something to do with file systems) allow to improve QA part?

from xattr.

lygstate avatar lygstate commented on June 5, 2024

@advancedwebdeveloper

@billziss-gh , could you tell whether your support of file systems (I see that you are dealing with few Golang packages, which has something to do with file systems) allow to improve QA part?

I am not sure I understand what you mean by "improve QA part".

To answer the original question: Windows does have Extended Attribute (EA) support. NTFS and I believe some versions of FAT support them. There is however a caveat: there is no Win32 API to access them and the NT API that exists is not documented.

The NT API consists of the functions NtQueryEaFile and NtSetEaFile and you can find information about them by searching online. I have example implementations of xattr functions using the NT API in the following places:

  • In my port of fsx to WIndows, which I use to test file systems.
  • In a simple POSIX layer that is included with one of the WinFsp file systems: winposix.c. Please note that this EA code is not regularly tested.

I also note that Cygwin has a Linux-like implementation of xattr that uses the same NT API. You may want to have a look there as well.

One final note: you will find out that NTFS likes to uppercase extended attribute names (so that myxattr will become MYXATTR upon retrieval). Some POSIX layers deal with this by forcing all extended attribute names to be lowercase.

I think uppercase can be resolved by things like base64 or hex encode

from xattr.

AaLl86 avatar AaLl86 commented on June 5, 2024

from xattr.

advancedwebdeveloper avatar advancedwebdeveloper commented on June 5, 2024

So, any progress here?

from xattr.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.