| | 1 | = IsMounted = |
| | 2 | Check whether the specified file device is mounted |
| | 3 | |
| | 4 | {{{ |
| | 5 | int IsMounted(const string& strMount); |
| | 6 | |
| | 7 | int IsMounted(const char* pszMount); |
| | 8 | }}} |
| | 9 | |
| | 10 | == Parameters == |
| | 11 | |
| | 12 | * strMount - string variable containing name to check |
| | 13 | * pszMount - character array containing name to check |
| | 14 | |
| | 15 | == Return Value == |
| | 16 | |
| | 17 | * Returns 1 if device is mounted, 0 if it is not mounted |
| | 18 | |
| | 19 | == Remarks == |
| | 20 | |
| | 21 | The function operates by reading /proc/mounts and checking for string match |
| | 22 | |
| | 23 | == Examples == |
| | 24 | |
| | 25 | {{{ |
| | 26 | string strMnt = "/mnt/fl1"; |
| | 27 | if(IsMounted(strMnt) == 0) |
| | 28 | { |
| | 29 | DisplayText(0, 0, "Flash is not mounted"); |
| | 30 | } |
| | 31 | }}} |
| | 32 | |
| | 33 | {{{ |
| | 34 | if(IsMounted("/mnt/fl1") == 0) |
| | 35 | { |
| | 36 | DisplayText(0, 0, "Flash is not mounted"); |
| | 37 | } |
| | 38 | }}} |
| | 39 | |
| | 40 | == See Also == |
| | 41 | |
| | 42 | |