public List<ServerFile> getFiles() {
		List<ServerFile> files = new ArrayList<>();

		Connection conn = null;
		PreparedStatement st = null;
		ResultSet res = null;
		try {
			conn = getController().getDb().getConnection();
			st = conn.prepareStatement(SELECT_FILES);
			st.setInt(1, getId());

			res = st.executeQuery();
			while (res.next()) {
				files.add(((new ServerFile()).bind(res)));
			}
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			getController().getDb().collect(conn, st, res);
		}

		for (ServerFile file : files) {
			// TODO: unmount the belonging share somehow.
			ServerCategory cat = categories.get(file.getServercategoryid());
			if (cat == null) {
				file.setFlag(ServerFile.DELETED);
				toUpdate.add(file);
				// continue;
			}
			file.setServercategory(cat);
			file.setServer(this);
		}

		return files;
	}