Re: Interview question - filestream

From: Rob Kennedy (.)
Date: 11/03/03


Date: Mon, 03 Nov 2003 13:12:15 -0600

Jim Poe wrote:
> Why would you use a filestream to move a file rather
> than some other technique such as a shell api call?

I can't really answer the question; I reject its underlying assumption
that I *would* use a file stream to move a file. Using the API, you have
a much better chance of retaining NTFS security, encryption,
compression, and stream information. TFileStream is ignorant to all that.

I'd accept the question if it were rephrased: "Under what circumstances
might someone prefer to use a file stream to move a file rather than
some other technique?"

One reason might be that the API function (or whatever other technique)
is not available or reliable on all the program's target systems.

Or maybe the API function is too complicated, making it easier to
re-implement the functionality from scratch than to spend time
understanding how to use the existing function.

-- 
Rob


Relevant Pages

  • Re: szPname As String * MAXPNAMELEN (How to declare)
    ... I am using GlobalAlloc API to allocate memeory for structure "MIXERCONTROL" ... And then I used following API function to get the mixer control iformation. ... >> Public szShortName As String ...
    (microsoft.public.dotnet.languages.vb)
  • Re: With API function, VB freezes up
    ... help section on the Microsoft site likes to put everything in VB.net or C ... you may get better help figuring out API stuff in the ... I haven't been able to just look up an API function ... > I've recently purchased a couple of tutorial books on the API (one by ...
    (microsoft.public.vb.general.discussion)
  • Re: Getting extended error information for PlaySound
    ... > I've seen GetLastError work in VB, it only seems to depend on the API ... it probably wasn't an error value for an API function that you called. ...
    (microsoft.public.vb.winapi)
  • Re: With API function, VB freezes up
    ... Up to now I've only been able to use the API if I find ... I haven't been able to just look up an API function ... I've recently purchased a couple of tutorial books on the API (one by ... I've done the "require variable declaration" thing since I ...
    (microsoft.public.vb.general.discussion)
  • Re: goolges web page
    ... Google has an API that you can access ... It uses SOAP. ... > Anyone know what technique goolge.com uses for its web page? ...
    (comp.lang.java.programmer)