Exemple #1
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from peerdrive import Connector, struct

# enumerate all stores
enum = Connector().enum()
for store in enum.allStores():
	mountName = enum.name(store)

	state = ""
	if enum.isMounted(store):
		state += 'M'
	else:
		state += '-'
	if enum.isSystem(store):
		state += 'S'
	else:
		state += '-'
	if enum.isRemovable(store):
		state += 'R'
	else:
		state += '-'
	if enum.isNet(store):
		state += 'N'
	else:
		state += '-'