Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6374

Re: Import files on accessible URL and save in

From ADL <alberto.dilullo@tiscali.it>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Import files on accessible URL and save in
Date 2011-11-11 10:04 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j9irun$8gg$1@smc.vnet.net> (permalink)
References <201111050945.EAA10302@smc.vnet.net> <j9gf3e$p76$1@smc.vnet.net>

Show all headers | View raw


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...@austin.rr.com>
> > >wrote:
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: Import files on accessible URL and save in Patrick Scheibe <pscheibe@trm.uni-leipzig.de> - 2011-11-10 12:12 +0000
  Re: Import files on accessible URL and save in ADL <alberto.dilullo@tiscali.it> - 2011-11-11 10:04 +0000

csiph-web