Question

Does Perforce supports file streams on Windows, on NTFS?

Was it helpful?

Solution 2

I just got a response from Perforce:

Perforce does not have any special support for NTFS Alternate Data Streams.

This means that you will lose any additional data stream when you submit a file into perforce.

OTHER TIPS

Sorry to resurrect such an old thread, but I found a workaround that will allow Perforce clients (P4/P4V) to create ADS data.

Chapter 2 of the Perforce Users Guide has a section titled "Mapping files to different locations in the workspace". This section covers how to remap the depot to the workspace and vice-versa.

Let's assume that you want to store some asset metadata with your files in Perforce. You create a tool that generates an ADS called asset.meta such that your filenames are of the form file.ext:asset.meta.

If you modify your Perforce Workspace to include the following:

//depot/....asset.meta //CLIENT/...:asset.meta

This will take ADS asset.meta streams and create files for them in Perforce.

foo.txt with an asset.meta ADS gets stored as 2 files in the depot: foo.txt and foo.txt.asset.meta. When you sync them down, they end joined correctly.

Now there are 2 caviats to be aware of.

1.) P4V will not see the ADSs. You have to add them manually through P4, the P4API or some other explicit mechanism.

2.) If the base file (foo.txt from our example) is not marked writable, you will not be able to sync the ADS.

You will have to deal with #1 in whatever way you want. #2 is trickier IMO. You can +w the main files so they are always writable on the client (if your workflows can accommodate that), or you can write a custom sync routine that handles making files read-only or read-write as necessary.

I may respond to this if I hear any good ideas from Perforce other than the ones mentioned above, but considering how high this page shows up in Google when searching for "Perforce Alternate Data Stream", I thought this might help someone.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top