@Override
	public List<String> getFilesList() {

		final List<String> files = new ArrayList<String>();

		if (isConnect()) {
			sendPackage(new Package(Mode.GET_FILES_LIST, new ArrayList<Object>()));
			Object obj;
			while (true) {
				try {
					obj = ois.readObject();
				} catch (final IOException e) {
					System.out.println("can't read");
					break;
				} catch (final ClassNotFoundException e) {
					System.out.println("can't read");
					break;
				}
				if (obj != null) {
					if (isPackage(obj)) {
						final Package pack = (Package) obj;
						final Mode mode = pack.getMode();
						switch (mode) {
							case GET_FILES_LIST:
								receiveFiles(files, pack);
								return files;
							default:
								System.out.println("default");
							break;
						}
						System.out.println();
						break;
					}
				}
			}
		}
		return files;
	}