Creating files/folders

Peter Haworth pete at lcsql.com
Fri Oct 5 17:25:22 EDT 2012


Thanks, that's a step in the right direction.  The syserror values will be
different on each platform so yes, it will be a pain trying to figure out
what they mean but more info is better than none at all!
Pete
lcSQL Software <http://www.lcsql.com>



On Fri, Oct 5, 2012 at 1:58 PM, Bob Sneidar <bobs at twft.com> wrote:

> I tried sysError() instead. It gives me 13 (for folder creation). It might
> be different for files. Now have fun parsing what that means! Jacque
> actually had something along these lines. A function that returned the
> textual equivalent of a system error?
>
> Bob
>
>
> On Oct 5, 2012, at 1:25 PM, Peter Haworth wrote:
>
> > Sorry I should have been more specific.  The result just says something
> > like "Can't create file" or some such generic message - I'm looking for
> > something more specific as to why it couldn't be created.
> > Pete
> > lcSQL Software <http://www.lcsql.com>
> >
> >
> >
> > On Fri, Oct 5, 2012 at 1:02 PM, Dr. Hawkins <dochawk at gmail.com> wrote:
> >
> >> On Fri, Oct 5, 2012 at 12:56 PM, Peter Haworth <pete at lcsql.com> wrote:
> >>> If I "open file <filepath>" for write" and the file doesn't exist LC
> >>> creates it.  But what happens if an error occurs? For example, the file
> >>> path includes a folder that doesn't exist, or permissions don't allow
> the
> >>> file to be created.  I know the file doesn't get created but how do I
> >> check
> >>> for an error?
> >>>
> >>> Similarly with "create folder <pathtofolder>", how do I check for
> errors?
> >>
> >> Shouldn't any such thing be in "the result"?  It has for things I've
> >> wanted, unless returned as a value from a function.
> >>
> >> --
> >> Richard E. Hawkins, Esq.
> >> (702) 508-8462
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list