Comments (11)
@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.
CC @asw101 @arschles @devigned
from xattr.
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.
@AaLl86 , please explain about NTFS's capabilities/functionality
@craigbarkhouse , please share your vision
CC @brymat-msft
from xattr.
@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.
@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
andNtSetEaFile
and you can find information about them by searching online. I have example implementations ofxattr
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 becomeMYXATTR
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.
from xattr.
So, any progress here?
from xattr.
Related Issues (18)
- xattr.Setxattr triggers an error with (errno 0) code HOT 4
- test fails: "operation not supported" HOT 7
- Darwin panic: com.apple.rootless attr has no value HOT 3
- Solaris/Illumos Support HOT 5
- List() fails with ERANGE on SMB1 HOT 4
- Tests fail on tmpfs HOT 4
- Symlink handling? HOT 4
- List returns error "cannot allocate memory"? HOT 12
- github build action HOT 2
- operation not supported
- Code is not formatted according to gofmt? HOT 2
- Build is broken on linux with the recent changes HOT 2
- Typo
- Superfluous space in `(*Error).String()` when `Error.Name == ""` HOT 1
- API stutters a lot HOT 2
- Switch to github CI
- EINVAL instead of ENOTSUP on Solaris HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xattr.