[Gambas-user] parse out the mount-points of fstab - how?
Fabien Bodard
gambas.fr at ...626...
Wed Oct 4 08:00:00 CEST 2006
2006/10/3, Amnon <amsoft at ...683...>:
>
>
> I need some help here. I wounder how I can parse the fstab to
> get all mount-points in a listbox.
>
> Thats what I have:
>
>
> PUBLIC SUB dvddrives_Click()
> DIM devar AS String[]
> DIM i AS Integer
> DIM procLoad AS String
>
>
> mountpoint = ""
>
>
> ' fstab search
> IF mountpoint = "" THEN
> IF Exist ("/etc/fstab") = TRUE THEN
> listbox1.clear
> SHELL "cat /etc/fstab >" & sTemp WAIT
> ProcLoad = file.Load (sTemp)
> KILL sTemp
> listbox1.contents=ProcLoad
> FOR i = 0 TO listbox1.count-1
> IF Instr(listbox1[i].Text , drives.text) > 0 THEN
> devar=Split(listbox1[i].text, "<some value to split must be
> here, but what one?>")
> mountpoint=devar[1]
> mountpointlist.add(mountpoint)
> END IF
> NEXT
> END IF
> END IF
>
> IF dvdsource = "" THEN
> logtext.Insert("[Debug message] No VIDEODVD found!"& "\n")
> ELSE
> logtext.Insert("[Debug message] VIDEODVD source: " &
> dvdsource & "\n")
> END IF
>
> END
>
> I don't get the string-value I can use to split.
> ---------------------------------------------
> Free POP3 Email from www.Gawab.com
> Sign up NOW and get your account @gawab.com!!
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
SHELL "cat /etc/fstab >" & sTemp WAIT
ProcLoad = file.Load (sTemp)
KILL sTemp
=
ProcLoad = file.Load ("/etc/fstab")
no ?
More information about the User
mailing list