Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Import files on accessible URL and save in

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122821] Re: Import files on accessible URL and save in
  • From: ADL <alberto.dilullo at tiscali.it>
  • Date: Fri, 11 Nov 2011 04:56:31 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201111050945.EAA10302@smc.vnet.net> <j9gf3e$p76$1@smc.vnet.net>

I was wandering if there is a way to modify FetchURL so that it
accepts a maximum number of lines / bytes / specific characters to be read.
E.g. FetchURL[..., MaxNumberOfSeparators -> 10, Separators ->"\n"]
might stop reading from the url when 10 "\n" have been read.

I do not master Java http support libraries enough to do this myself,
but is some cases I would have found this functionality useful.

ADL


>
> On Wed, 2011-11-09 at 06:24 -0500, Todd Gayley wrote:
> > At 04:24 PM 11/8/2011, DrMajorBob wrote:
> > >This fails, and I wonder why?
>
> > >DeleteDirectory["/private/var/folders/kY", DeleteContents -> True]
>
> > >$Failed
>
> > >DeleteDirectory::dirne: Directory /private/var/folders/kY not empty. >>
>
> > I would guess it is because other processes have files open in that
> > directory. Why are you trying to delete an entire directory (two
> > levels up, no less), when FetchURL just created one file?
>
> > As for your question about documentation, Utilities`URLTools`FetchURL
> > is not an officially documented part of the system, which could be
> > for a number of reasons. However, it has been a stable part of
> > Mathematica for long enough (it is used internally by Import) that I
> > am comfortable recommending it to users who need its functionality.
>
> > Todd Gayley
> > Wolfram Research
>
> > >On Tue, 08 Nov 2011 16:08:46 -0600, DrMajorBob <btre... at austin.rr.com>
> > >wrote:
>



  • Prev by Date: Re: Re: problem seeing, getting, marking, copying coordinates
  • Next by Date: Re: Change $UserBaseDirectory
  • Previous by thread: Re: Import files on accessible URL and save in
  • Next by thread: Re: Import files on accessible URL and save in local machine.