Very nice, it works fine on XP. When you fill out
the Summary properties page for the file, it really
adds a stream.

It would be good to consider making the page
Literate, and adding a test Note entry at the end:

Note 'Test' NB. select and Ctrl+E
  load 'files dir format'
  ferase jpath'~temp/test.txt'
  'test' fwrite jpath'~temp/test.txt'
  'abc'  fwrite jpath'~temp/test.txt:a'
  '123'  fwrite jpath'~temp/test.txt:b'
  fread jpath'~temp/test.txt'
  fread jpath'~temp/test.txt:a'
  fread jpath'~temp/test.txt:b'
  dir jpath'~temp'
NB. add Summary Properties in Explorer
  streams jpath'~temp/test.txt'
  hexdump fread jpath'~temp/test.txt:SummaryInformation'
)

This is some output:

   streams jpath'~temp/test.txt'
+---+---------------------------------------------+
|4  |::$DATA                                      |
+---+---------------------------------------------+
|168|:SummaryInformation:$DATA                   |
+---+---------------------------------------------+
|3  |:a:$DATA                                     |
+---+---------------------------------------------+
|3  |:b:$DATA                                     |
+---+---------------------------------------------+
|12 |:c:$DATA                                     |
+---+---------------------------------------------+
|0  |:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d}:$DATA|
+---+---------------------------------------------+
   load'files format'
   hexdump fread jpath'~temp/test.txt:SummaryInformation'
00  FE FF 00 00-05 01 02 00  00 00 00 00-00 00 00 00  |.............|
10  00 00 00 00-00 00 00 00  01 00 00 00-E0 85 9F F2  |...............|
20  F9 4F 68 10-AB 91 08 00  2B 27 B3 D9-30 00 00 00  |.Oh┌...+'..0...|
30  78 00 00 00-05 00 00 00  01 00 00 00-30 00 00 00  |x.........0...|
40  00 00 00 80-38 00 00 00  04 00 00 00-40 00 00 00  |[EMAIL PROTECTED]|
50  03 00 00 00-50 00 00 00  02 00 00 00-64 00 00 00  |...P......d...|
60  02 00 00 00-E3 04 00 00  13 00 00 00-09 04 00 00  |......├......|
70  1E 00 00 00-05 00 00 00  4F 6C 65 67-00 00 00 00  |......Oleg....|
                                                                        
80  1E 00 00 00-0B 00 00 00  4D 79 20 53-75 62 6A 65  |......My Subje|
90  63 74 00 00-1E 00 00 00  09 00 00 00-4D 79 20 54  |ct.........My T|
A0  69 74 6C 65-00 00 00 00                           |itle....        |


--- On Fri, 5/2/08, David Mitchell <[EMAIL PROTECTED]> wrote:

I put a new version in the wiki that works with XP as well.

--
David Mitchell

David Mitchell wrote:
> See http://www.jsoftware.com/jwiki/Scripts/Streams for one way to list 
> streams.
> 
> -- 
> David Mitchell
> 
> Don Guinn wrote:
>> Weird! I used Windows to rename test.txt and it renamed them all. Haven't
>> tried deleting yet, but it sure looks like a good way to hide files. I
>> wonder if it would be possible for 1!:0 to list those files like 
>> test.txt:a?
>> That would give full support. Otherwise, those files could be around 
>> and no
>> way to find them.
>>
>> On Thu, May 1, 2008 at 5:59 AM, Oleg Kobchenko <[EMAIL PROTECTED]> wrote:
>>
>>> File streamns in NTFS
>>>   http://msdn.microsoft.com/en-us/library/aa364404.aspx
>>> is the ability to store more that one file image
>>> under the same name. Eg used by NT to store the
>>> extended Properties as seen in last tab of file
>>> properties in Explorer (if you wondered where that
>>> thing goes).
>>>
>>> And J supports them
>>>
>>>   load'files'
>>>   'test'fwrite jpath'~temp/test.txt'
>>> 4
>>>   'abc'fwrite jpath'~temp/test.txt:a'
>>> 3
>>>   '123'fwrite jpath'~temp/test.txt:b'
>>> 3
>>>   fread jpath'~temp/test.txt'
>>> test
>>>   fread jpath'~temp/test.txt:a'
>>> abc
>>>   fread jpath'~temp/test.txt:b'
>>> 123
>>>   load'dir'
>>>   dir jpath'~temp'
>>> jbreak     <dir>     01-May-08 07:37:16
>>> 1.ijx            583 28-Apr-08 02:10:38
>>> fif.htm         3821 30-Apr-08 01:55:58
>>> test.txt           4 01-May-08 07:38:03
>>>
>>> See--only one file "test.txt".



      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to