async _handleFileStream({ stream, connection }) {
		try {
			const peerId = connection.remotePeer.toString();
			logT('p2p', 'New file stream from peer', peerId);
			
			// Read the first message which should contain file info
			let fileInfo = null;
			
			try {
				const chunks = [];
				for await (const chunk of stream.source) {
					chunks.push(chunk.subarray());
				}

				try {
					fileInfo = JSON.parse(Buffer.concat(chunks).toString());
				} catch (err) {
					throw new Error('Invalid file info message: ' + err.message, Buffer.concat(chunks).toString());
				}
				
				if (!fileInfo || !fileInfo.filename) {
					throw new Error('Invalid file info message');
				}
				
				// Normalize path for consistent handling
				fileInfo.filename = fileInfo.filename.replace(/\\/g, '/');
				
				logT('p2p', 'Received file request for', fileInfo.filename);
			} catch (err) {
				logTE('p2p', 'Error parsing file info message:', err);
				await this._sendErrorResponse(stream, 'invalid_request', err.message);
				return;
			}
			
			// Basic validation checks
			if (!this.dataDirectory) {
				await this._sendErrorResponse(stream, 'no_data_directory', 'No data directory configured');
				return;
			}
			
			// Validate the file path
			const filePath = ph.resolve(this.dataDirectory + '/' + fileInfo.filename);
			if (!filePath.includes(this.dataDirectory) || filePath === this.dataDirectory) {
				await this._sendErrorResponse(stream, 'security_violation', 'File must be from data directory');
				return;
			}
			
			// Check blacklist
			for (const blackWord of this.filesBlacklist) {
				if (filePath.includes(blackWord)) {
					await this._sendErrorResponse(stream, 'blacklisted', 'File is blacklisted');
					return;
				}
			}
			
			// Special handling for directory requests
			const pathExists = fs.existsSync(filePath);
			const isDirectoryRequest = pathExists && fs.lstatSync(filePath).isDirectory();
			
			// Handle non-existent paths
			if (!pathExists) {
				// If this is a directory request, check if parent exists for empty dir handling
				if (isDirectoryRequest) {
					const parentDir = ph.dirname(filePath);
					if (fs.existsSync(parentDir) && fs.lstatSync(parentDir).isDirectory()) {
						// Send empty directory listing
						await this._sendDirectoryListing(stream, [], fileInfo.filename);
						return;
					}
				}
				
				// Path doesn't exist
				await this._sendErrorResponse(stream, 'not_found', `File or directory not found: ${fileInfo.filename}`);
				return;
			}
			
			// Handle directory request
			if (isDirectoryRequest) {
				await this._handleDirectoryRequest(stream, filePath, fileInfo.filename);
			} else {
				// Regular file transfer
				await this._handleFileRequest(stream, filePath, fileInfo.filename);
			}
		} catch (err) {
			logTE('p2p', 'Error in file stream handler:', err);
			try {
				await stream.abort(err);
			} catch (closeErr) {
				logTE('p2p', 'Error closing stream after error:', closeErr);
			}
		} finally {
			await stream.close();
		}
	}
Handle incoming file transfer stream requests
@param {Object} params - Stream parameters
@param {Object} params.stream - The stream object
@param {Object} params.connection - The connection object
@returns {Promise<void>}
@private