Peek requests
#2
The first two are already available in yab without calling the system.

PackageStatus:

Code:
name$="yourprogramname"
path$=attribute get$ "",""
programname$=path$+"/"+name$
print programname$
attribute$=attribute get$ "",programname$

if instr(attribute$, "SYS:PACKAGE_FILE") and instr(path$,"/boot/system") print "program is a package in the system tree"
if instr(attribute$, "SYS:PACKAGE_FILE") and instr(path$,"/boot/home/config") print "program is a package in the home tree"
if (! instr(attribute$, "SYS:PACKAGE_FILE")) print "not in a package location"

FileExists:

Code:
name$="your file name"
if open(name$,"r") then
print name$+" exists"
else
print name$+" does not exist"
endif

The path may need to be added to the peek$ command.
Reply


Messages In This Thread
Peek requests - by clasqm - 03-21-2016, 02:18 AM
RE: Peek requests - by bbjimmy - 03-23-2016, 09:42 AM
RE: Peek requests - by clasqm - 03-25-2016, 04:23 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)
Free Web Hosting