03-23-2016, 09:42 AM
The first two are already available in yab without calling the system.
PackageStatus:
FileExists:
The path may need to be added to the peek$ command.
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.