public DBUpdate(Path path) throws DBUpdateInvalidFilenameException,
			DBUpdateNotAFileException, DBUpdateNotReadableException {
		this.path = path;

		// check permissions
		File f = path.toFile();
		if (!f.isFile()) {
			throw new DBUpdateNotAFileException();
		}
		if (!f.canRead()) {
			throw new DBUpdateNotReadableException();
		}

		// parse the string
		Scanner sc = new Scanner(path.getFileName().toString());
		try {
			sc.useDelimiter("_");
			int y = sc.nextInt();
			int m = sc.nextInt();
			int d = sc.nextInt();
			int c = sc.nextInt();
			this.timestamp = new DBUpdateTimestamp(y, m, d, c);

			this.db = sc.next();

			sc.useDelimiter(".");
			this.name = sc.next();

			sc.close();
		} catch (InputMismatchException e) {
			sc.close();
			throw new DBUpdateInvalidFilenameException();
		} catch (DBUpdateTimestampInvalidException e) {
			sc.close();
			throw new DBUpdateInvalidFilenameException();
		}
	}